First,install Envyng which is a simple GUI tool that can be used to install/uninstall Video driver for your ubuntu.
Just use one command in terminal(Applications/Accessories/Terminal):

sudo apt-get install envyng-core envyng-qt

This will properly installed envyng with both GUI mode and text mode.
Go to Applications->SystemTools->EnvyNG.


You can easily install the driver by select the recommended one and click on Apply

Alternatively,type this command in terminal:

envyng -t

and type a number in this screen:


Update:By now,envy isn’t available in Ubuntu 10.04(Lucid).You can read this howto about install nvidia driver in ubuntu 10.04