Unlock your iPhone by pressing either the silver button along the top edge of the phone or the round button at the bottom of the screen. This will prompt the lock screen, which includes a slider along the bottom that you must use your finger to open. If you have a passcode enabled, you will be prompted to enter it.
Select the icon of the app that you wish to move to a folder by placing your finger on it, and leaving it there for approximately two seconds. All of your icons will then begin to graphically "wiggle" back and forth, and a black "x" will appear in the top-left corner of many of them.
Use your finger to drag the app's icon over top of whatever other app you would like to group it with. this will automatically create a folder containing those two apps. You will have the option of naming the folder. Typically the iPhone will provide a default name that relates to the category of the apps that you are grouping together.
Add more items to the folder by dragging their icons over to the folder and lifting your finger.