Say you have a new macbook and you don't know the password for a user account you can do the following to reset the password:

1. Reboot
2. After the apple boot beep, hold down Command-S
3. Wait for command prompt
4. $ mount -uaw
5. $ passwd <yourusername>