Since version 2.7, WordPress has an internal tool for automatic updating. You can start the update by clicking on the link in the toolbar (if it is present) or by visiting the Tools > Update (pre-3.0 versions) or the Dashboard page > Updates (Version 3.0+). Once on this page, click on the automatic update to start the process. You have nothing else to do, and once the process is complete, your system will be updated.
For automatic update to work, at least two criteria must be met:
(A) The file property: All WordPress files must belong to the user under which your Web server runs. In other words, the owner of the WordPress files must match the user under which the Web server runs. The user of the web server (named “apache”, “web”, “www”, “nobody”, or something similar) is not necessarily the owner of the WordPress files. Generally, WordPress files are the property of the FTP user who uploaded the original files. If there is no match between the owner of the WordPress files and the user under which the Web server is running, you will see a dialog box asking you login information and you find that whatever you enter you will not be able to update automatically.
(B) The file permission: All files of your WordPress must also be writable by the owner, or belonging to a group writable by the user under which the Apache server is running.
On shared hosting, the WordPress files MUST NOT be owned by the web server. If more than one user owns various files in the installation (because of changes made by deleting and reloading the files using different accounts, for example), the file permissions require write access for the group (for example, 775 and 664 rather than the default 755 and 644). The file permissions (in general) must be adjusted according to the server environment.
Do not using PHP5 is a known cause of failure of the automatic update. If you see the message indicating that the update will download the zip file and nothing happens, it may be that you do not use PHP5. Many hosts offer both PHP4 and PHP5, and switching from one version to another is generally very easy, most often it is a simple entry in your .htaccess file. If you can not upgrade to PHP5, and you encounter this problem, use the manual update.
If you have customized the core theme, you should not use automatic updating, that would crush your changes – you must make a manual update.
If you see an obstinate message “failed update”, delete the file .maintenance from your WordPress directory using FTP. This will remove the annoying message “failure of the update.”
If automatic upgrade does not work, do not panic! Just try a manual update.
Translated from WordPress.org