Macbook Pro won't let me type my password to login
I have a Macbook Pro with OS X Yosemite and it won't let me enter my password to login. When I am done using it, I close it without turning it off. When I come back to use it again I open it and I get the login screen but hitting the keys does nothing. No letters are typed. The mouse pad doesn't move the curser. I have to hold the power button to turn it off and then I can login. What am I doing wrong? This is my first mac, I'm used the PC operations.
MacBook Pro (13-inch Mid 2012)