By default, plugging in an external display or connecting your Mac to a projector will "extend" your desktop with additional space rather than mirroring what you see on the built-in screen. To show your laptop screen over a projector or mirror the screen to a secondary display you must enable "Display Mirroring" by following these steps:
- Make sure your additional display is properly connected and powered on.
- From the Apple () menu, choose System Preferences.
- From the View menu, choose Displays.
- Click the Arrangement tab.
- Enable (check) "Mirror Displays" in the bottom-left corner.
More information on options available when connecting your Mac to external displays is found here: https://support.apple.com/kb/ht5019