I have 1GB RAM. Can someone tell me how large I should make the swap partition?
The exact amount depends on how much hard drive space you want for your other files so it's up to you, but your swap partition should be between 1 and 2 GB in size.
Working: According to the Wiki page on this, you need the swap space to be at least as much as the amount of RAM you have (1 GB) if you're using hibernate and otherwise at least as much as the square root of the RAM you have (1 GB) and at most twice as much as the RAM you have (2 GB).
I agree with Ads20000 with a small modification. You need at least 1 GiB RAM to hibernate (1 GiB = 2^30 bytes, approx=1.073 GB, so with some margin you need at least 1.1 GB).
But there is another problem. 1 GB RAM is not enough to run Ubuntu well. I would recommend a flavour of Ubuntu with a lighter desktop environment,
- Lubuntu with the ultra light LXDE
- Xubuntu with the medium light XFCE
- Ubuntu MATE with the medium light MATE
And I would recommend that you start by trying the version 16.04.1 LTS, the current version with long time support. See this link for more details,
You can get more detailed help, if you tell us more about the computer: Brand name, graphics chip/card, wifi chip/card, and how you intend to use it. (Please add this information by editing your question.)