If it is Lion or Mountain Lion, restart holding down cmd-r. It should boot into the Recovery HD. You'll have options to use Disk Utility, Reinstall, etc.
In the Utilities menu, select Terminal.
At the prompt, type resetpassword.
It will start the reset password utility. Select your hard disk boot volume, the user, and follow the prompts to reset.
Now, you need to figure out what OS it shipped with. If it was Snow Leopard, you can call AppleCare to order replacement disks. If it was Lion or Mountain Lion, you need to call AppleCare and get the OS license attached to your AppleID. If you don't, you won't be able to reinstall.
Since you have no idea what the previous user installed on the Mac that could possibly be malicious, you do need to erase the drive and reinstall. You will either need the disks (Snow Leopard) or the license tied to your AppleID (Lion or Mt Lion). In the mean time, you should create a new Admin account in the Users & Groups System Preferences. Once you do, and you know you can log in, delete the old user's account.