Thanks for the question. It sounds like you are experiencing an issue with your proximity sensor. The following article provides more information.
Note: If you are using a third-party case, you'll want to try these steps without it.
Screen will not lock or go black when answering calls
1. Verify mute or speaker have not been activated, just prior to placing your ear over the receiver.
2. While on a call hold your hand over the top third of the display, and verify that the screen is locked or goes to sleep.
My issue is still not resolved. What do I do next?