With Apple TV, you can mirror the entire display of your Mac to your TV, or use your TV as a separate display. To turn on AirPlay, follow these steps:

Make sure that your TV is turned on. Choose in the menu bar, then choose your Apple TV. If an AirPlay passcode appears on your TV screen, enter the passcode on your Mac. Mirror your display or use your TV as a separate display: To mirror your display, choose , then choose Mirror Built-in Display.

, then choose Mirror Built-in Display. To use your TV as a separate display, choose , then choose Use As Separate Display. To turn off AirPlay, choose , then choose Turn AirPlay Off.

If you don't see in the menu bar, choose Apple menu  > System Preferences, click Displays, then select the "Show mirroring options in the menu bar when available" checkbox.

Learn more about how to AirPlay video from your Mac.