stuff out of the RAM when the RAM is getting full and something hasn't been used for a while. With Swap File off no space is set aside - theory - and it all stays in the RAM, with Swap File on space is set aside and some RAM is used to know what's where. With a few gigs of RAM I doubt you'd ever see a performance difference due to swap file unless you're running some huge CAD program.
The only time I've ever seen a performance difference with the use of a Swap File was many years ago when the maximum RAM was around the 8 MB mark. Then you could see a difference, and even putting the Swap File on a different physical hard drive made a performance difference due to access times.
................
With the Swap File on the system moves any memroy stored information from the RAM to the hard drive when the RAM is getting full, and will Swap whats stored in the Swap File as it needs that information - kind of like an extended RAM area. With it off, the system just dumps the long unused info from the RAM and has to call it back from the hard drive by the application when you need it again. If any of that information had been calculated by the application, you can lose it. With some versions of Windows having the Swap File off can lead to a system crash, depending upon what it's trying to recall.
The best thing is to have it on - but it won't make any difference to the system performance that you can tell.