In order to increase the size of the partition, you need two things: a liveCD, liveUSB, or another Linux installed on the computer for one, and room before or after the partition in question for the other. The partition you want to change size must be unmounted, and any partition before or after must also be unmounted.
Assume your free space is after the Ubuntu partition. Running gparted from liveCD/liveUSB, you would select the disk on which the Ubuntu partition resides. If the space after the Ubuntu partition is also partitioned for some purpose, you must select that partition, then you must move the front end back to create free space for Ubuntu. Then select the Ubuntu partition and move the back end of the Ubuntu partition to take up the free space.
Commit the changes to rewrite the partition table, then reboot into Ubuntu with the new partition table and the added room in the partition.