How to use F1-F12 keys with MacBook?
You have two options; either hold down fn as L2G suggested, or switch to the F1 etc. keys to work like that directly.

This can be setup in keyboard preferences here:



If you do that, F1 will work as the actual F1 key. If you want to use it for controlling the brightness, you'd hit fn with it.