there is a series of commands you can type directly before the start up of a mac. The way this works is by deleting the file that says you have already completed the process of creating your account the first time you turn on your mac (if you noticed the first time you turned on your mac you had the "hello introduction" along with some questions regarding your name and new username, password, etc). By deleting that file the mac goes back through that process where you can create a new admin account and therefore change the passwords of other accounts etc. Does anyone know if this can be prevented from other people doing it to your mac?
It can be prevented. Boot up your mac with your Mac OS X install DVD, and after it has loaded, go to utilities and select Firmware Password Utility. Select the checkbox "Require Password to start this computer from another source" and type in a password.
This password will prevent people from:
No. 2 is the one where people type commands in it to reset the setup data in which they can go through the setup procedure and set up a completely new administrator account.
However, the best way is to keep your mac with yourself. Anyone with root/administrator access can bypass this feature, by typing a few commands in the terminal. Keep your password secret and complex.
It is also worth mentioning that the EFI password is easily crackable. Some people had success with resetting the PRAM and gaining access, while others used exploits in the OS X system to gain root access and disabling the password using terminal commands. The way Apple encrypts is also very lax and you should make it very much different from your OS password.