This question already has an answer here:
My ex-wife managed to get on to my Mac (OS X 10.9.4) and change my password for log on. Luckily, I am still able to access my Mac as she didn't set it to screen lock. What do I need to do in order to get back to my old password so that I can set a new one. Can I simply restore from my Time Machine to get it back to my old password? Or do I need more advanced help?