If you wish to connect to the AppleTV from your MacBook:
You will then be prompted, on your MacBook, to enter a 4-digit code that will appear on the screen.
Enter the 4-digit code and your MacBook will automatically connect to the Apple TV.