This is Martha's first trip in the TARDIS. Martha and the Doctor go to London, in 1599. They visit the newly-opened Globe Theatre and see the Shakespeare's play "Love's Labour's Lost" and meet Shakespeare. He gets impressed with Martha.
Shakespeare is writing the play "Love's Labour's Won" (the lost play). Meanwhile, three Carrionites witches want to interfere on the final lines of the play by placing a code to open the portal for the Carrionites who want to destroy Earth.
By the end of the episode, Shakespeare reveals he knows the Doctor isn't from Earth and Martha is from the future.
It's visible the Doctor still misses Rose.