Changing Mysql password is one of the very essential & critical task which you need to do while taking care of the database. By default "root" comes up with admin privileges and no password for root. Just to be clear, this root user is different from what your Linux/Unix system root user is, so changing password for this user, won't change password for root user for operating system.
Mysql stores the password in the "user" table in "mysql" database. To change/update a password, we need to update that table data. That can be done either at the OS level with "mysqladmin" command or either at the Mysql level with sql command.