It depends on what is locked. If it is Windows then, as has been said, do a new installation.
If is is a password in the ThinkPad's hardware, there are two possible passwords. One can be reset and the other can't. (See the manual on www.lenovo.com.) This is on order to turn stolen ThinkPads into scrap.)
If it is the disk drive password then you will need to replace the disk drive.