Depends on what you mean by "locked".
If it says something along the lines of iCloud Activation Lock and it wants
a password for an email account, you might as well put them back in the bin
room. You can't get around that without the password and or a receipt for
the purchase and take it an Apple store. It's an anti-theft measure.
If it's just some 4 or 6 digit number lock, or a message saying the device
is locked and the max number of attempts has been reached, I beleive all you
need is a computer with iTunes running on it, put the device into the DFU
mode (google it) and restore as a new device.
That'll erase everything on it but it'll still be useable as a new device.
-bruce
b...@ripco.com