In Users & Groups into System Preferences, click at the bottom of the Users & Groups window. Enter your password to unlock. There you can click on ‘Change Password'. Then a dialog box appears and there you need to mention the old password, after enter your new password, reconfirm it and select change password. By following these steps your password gets changed easily and you can log in with a new password.