From some website called Wikipedia:
In the Mac OS up to Mac OS 9, the function keys could be configured by the user, with the Function Keys control panel, to start a program or run an AppleScript. Mac OS X assigns default functionality to F9, F10, and F11 (Exposé); F12 (Dashboard); and F14/F15 (decrease/increase contrast). On newer Apple laptops, all the function keys are assigned basic actions such as volume control, brightness control, NumLock (since the laptops lack a keypad), and ejection of disks. Software functions can be used by holding down the Fn key while pressing the appropriate function key, and this scheme can be reversed by changing the Mac OS X system preferences.
Under MS-DOS, individual programs could decide what each function key meant to them, and the command line had its own actions (e.g., F3 copied to the current command prompt words from the previous command). Following the IBM Common User Access guidelines, the F1 key gradually became universally associated with Help in most early Windows programs. To this day, Microsoft Office programs running in Windows list F1 as the key for Help in the Help menu. Internet Explorer in Windows does not list this keystroke in the help menu, but still responds with a help window. F3 is commonly used to activate a search function in applications, often cycling through results on successive presses of the key. ⇧ Shift+F3 is often used to search backwards. Some applications such as Visual Studio support Control+F3 as a means of searching for the currently highlighted text elsewhere in a document. F5 is also commonly used as a refresh key in many web browsers and other applications, while F11 activates the full screen/kiosk mode on most browsers. Under the Windows environment, Alt+F4 is commonly used to quit an application; Ctrl+F4 will often close a portion of the application, such as a document or tab. F10 generally activates the menu bar, while ⇧ Shift+F10 activates a context menu. F2 is used in Windows Explorer, Visual Studio and other programs to rename files or other items.