There are several methods to recover the Drupal administrator ("user 1") password. The fastest way is using drush.
Request new password via e-mail
You can reset your password by requesting a new password at
Change password with a database query
Drupal 6 and below
Execute the following query on the Drupal database where 'givememypasswordback' is your new password. You will need to log into your database using phpMyAdmin or another tool.
UPDATE users SET pass = MD5('givememypasswordback') WHERE uid=1;
Recover password with Drush
Drush offers a number of methods to recover the administrator's password.
Drush can generate a one-time login link.
drush upwd --password="givememypasswordback" admin
(where "admin" is the user name)
Update password with query
drush sql-query "UPDATE users SET pass = MD5('givememypasswordback') WHERE uid =1;"