Thanks for asking the Apple Support Communities for help with your iPhone. It sounds like you may be experiencing issues with the lock screen enabling when you do not want it to. I am happy to check this out with you.
I recommend trying the troubleshooting provided in the following help article to check your buttons: About the buttons and switches on your iPhone, iPad, or iPod touch
If you still have issues, I would like to ask some questions for you to answer when you write back in.
1. Does this only occur when you are doing something specific, or inside a specific app?
2. Has anything changed since before it started? Such as updates, upgrades, restores, etc.?
3. What iOS version are you currently running?
Thanks and have a wonderful day.