You can do this with a Snow Leopard DVD. Apple sells this for $20 as an upgrade path, and for legacy Mac hardware. Apple no longer supports this, so do not expect to get any updates. They're selling it as an upgrade path for newer versions of OS X.
What you want to do to get it to load is put it in and press the Option key, or C. Either of these should work. If you choose to use the Option key, you need to wait for it to show in the boot devices. C loads it automatically. Think of it as a boot override in the Mac world. Let this thing load. It will take a while.
After it loads, you're going to want to go under Utilities and find the Password reset utility. This should allow you to do it.
Hard Disk Passwords are encrypted and many vendors will not reset these. Their solution is a new hard disk. The reason for this is the HDP is encrypted, and replacing the drive is cheaper. If you crack it the risk of killing a drive with this is VERY real. It may even cost you your data. You can't bypass these if it's there. It will always ask before it can do anything else.
Being I changed this answer to not read as if I wrote it like I don't care about the quality, I need to update this. Mac computers have used ATMEL chips since 2011 for this password. You can't clear this with the RAM trick anymore, and the solution proposed to the OP may not work, either. Apple is the only one who can remove it now. Yes, I know you can short the ATMEL chip if you know the pinout and other security isn't there like a security chip like the Thinkpads have, but I don't like to talk bout how to execute this on a forums in general. If the machine has a TPM, it may double as a security chip, too.
If you want to short the ATMEL chip out on a 2011 Mac, you're on your own.