Install Firefox 4 via Terminal :
Go to Applications > Terminal and enter the following commands carefully,
sudo apt-add-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get install firefox
Install Firefox 4 via GUI Software Center :
Launch Ubuntu Software Center. Head over to Edit > Software Sources and click the ‘Other Software’ tab. Press ‘Add’ and then add the PPA ppa:mozillateam/firefox-stable.
After that you need to update sources. For that go to System > Administration > Update Manager to perform an upgrade.