I just bought a used iMac. Should arrive Friday morning. I just thought of something... This is a used computer, so how am I going to delete certain files if I don't know the Administrator name or password?
You can boot into Recovery (hold
R during startup) to change the password. Once booted from the recovery partition select Terminal from the Utilities menu and then enter
Although, honestly, you might just want to erase the disk and install a new copy of OS X.
It depends on what the previous owner decided to do. Apple's guide on What to do before selling or giving away your Mac specifies to erase the computer and leave it on the Setup Assistant, which would be like you had bought the device new.
If the previous owner does not erase the computer or give you the admin password, you can wipe the drive and reinstall macOS yourself.