Find instructions at ResExcellence. If you are using Jaguar, or even if you are not, you should probably have a look at this article at xlr8yourmac.com
Ed. note: In general, only systems with less than 512MB of RAM will benefit from having a dedicated swap file. If you aren't sure whether you need one, run 'top' from the Terminal after several hours of activity and see how many pageouts are listed. If it is a large number then you may benefit from a dedicated swap file.