Recently I have bought myself a nice an shiny Apple TV. If you are familiar with the product, you will know that it comes with a remote control that is compatible with your macbook and it will work by default directly on it without any intervention. Also, if you have already a remote control for your macbook, it will work in the same manner on your Apple TV.
So we have a pickle here: 2 devices and 2 remote controls working on both devices in the same time. Nasty ;)
1. Proceed to System Preferences > Security & Privacy.
2. Click the lock situated in lower left corner. You will be asked to introduce your password.
3. Press on "Advanced..." button in lower right corner.
4. If it looks like this with the message "This computer will work with any available remote." it means exactly what is written.
5. Press on "Pair..." button and follow the on screen directions.
Hold the remote a few inches away from the computer and then hold simultaneous the Menu and Next buttons until the paired-remote graphics appears on your screen (like below).
5. You are done! The menu should look like in the image below and your mac will work only with the paired remote.
Now, as a side tip, one remote control will work with your mac but it is still paired with your Apple TV so by following the menus, you have to do the same (pairing the other remote control) on your Apple TV.