You have two ways.
http://www.apple.com/iphone/features/folders.html is very helpful for how to do it directly on your iOS 4 device.
Some people find it easier to do this on the computer. To create, edit, and sync folders from iTunes:
• Connect your iOS 4 Device to your computer
• If it is not automatically recognized by iTunes, find it under Devices on the left column of iTunes then click on it.
• Click on the Apps tab
• Make sure there is a checkmark in Sync Apps
• Under this option, make sure there is a checkmark in all applications you want to sync to your device.
• On the right side of this tab, select the screen on which to create the folder.
• To create a folder drag one App over another, hold for a few seconds, then drop the App in the folder that appears.
• To add an App to an existing folder, double-click the folder, then drag the App from the list on the left into an existing folder.
• You can double-click the folder icon to see the contents in an overlay.
• This will allow you to rename the folder.
• This will allow you to drag Apps to rearrange them within the folder.
• As stated above, this will also allow you to drag an App from the list of Apps on the left in order to place it in the open folder.