Knowing what machine and what operating system is helpful anytime you ask for help BTW.
If it's pre-10.7, which I figure it is, you need to boot off of an installation DVD or USB installation stick. After the first screen or two, language choice etc, in the menu bar under Utilities there is an option to change the log on passwords.
Make note though that when you change the log on password in this way it doesn't change the keychain password so when you reboot it will ask if you want to create a new keychain.
If it's 10.7 or later;http://coolestguidesontheplanet.com/reset-forgotten-admin-password-mac-osx/
Also the Reset Password utility is the same from around 10.4 on so the screen shots in the link will be relevant.