Most of the time, in Ubuntu, you can easily change the screen resolution by going to Preferences > Screen Resolution. However, sometimes that doesn't work, and sometimes the resolution that you want isn't on the list.
Thankfully, there is a more advanced way where you can completely control the resolution - the only bad thing is, it involves using the terminal. Most of it is just skipping through options and picking a couple of resolution.
Open up a terminal, from Accessories > Terminal and type the following:
$ sudo dpkg-reconfigure xserver-xorg
You'll be asked for your password, so enter that in and press Enter (ignore the fact that nothing appears as you type, that's normal). After a few moments, you'll see this screen.
Make sure you leave this setting exactly as it is. Hit tab to head to the OK button and press Enter.
Leave the next screen also exactly as is, hit Tab and press Enter again.
Once again, just Tab and Enter again on this screen.
Same again here, don't touch any settings, just Tab and Enter.
Just leave the setting as is and press Enter here.
From here on, accept all the defaults until you get to this screen:
Use the arrow keys and the spacebar to select the resolutions you want enabled. Once you're done, hit Tab and press Enter to OK that screen.
Continue to do the accept the defaults dance until this screen:
Choose the Medium option, hit Tab and press Enter. On the next screen, pick your favourite resolution, the one that you actually want to run at, and press Enter.
From now on - yes, you guessed it, accept the defaults and you should be sent back to your terminal. Now, the final step is to restart the graphics server. Press Ctrl-Alt-Backspace and then log back in.
You should be at the right resolution!
If anything goes wrong, there should be a backup of the relevant file. If you get stuck at a text prompt, do the following:
login: [[type your username here]]
Enter your password when prompted.
When you're in, do the following:
$ sudo cp /etc/X11/xorg.conf.2[press Tab here and it will fill in the rest] /etc/X11/xorg.conf
If you're asked to overwrite the file, say yes. Now reboot the machine by typing in:
$ sudo reboot
Hopefully, you should be back into a graphical environment once it's rebooted.