What OS did the Mac originally come with? If it was Lion or later, restart and hold down Command+Option+R to boot into Internet Recovery Mode. Make sure you have an Internet connection.
Once at the recovery screen, use Disk Utility to both repartition and erase the drive. That will wipe everything off of it, including the current recovery partition which is locked to your account. Exit Disk Utility when you're done and choose to reinstall the OS. When reinstalled from Internet Recovery Mode, the original OS that Mac shipped with is installed and not locked to an Apple user ID.
If it shipped with Snow Leopard or earlier, you need to boot to the gray DVD it shipped with and repeat the above (use DU to wipe the drive and reinstall the original OS).