Whats wrong with my android phone(htc desire)

A

AC Question

I had my phone 1year and 3 months..this is the first time I encountered this problem.. the screen locks everytime I watch a video, send a message or comment to any friends's posts.. this morning also I cannot turn off my alarm coz my screen is off, so I waited until it stop ringing and then I unlocked my phone to dismiss the alarm. After pressing okay the screen went off again..