You seem to have injured the attachment of the foreskin with the glans of the penis. That’s the reason it’s painful. The reason why you are not able to pull it back could also be the pain you have to bear while you are doing so.
Next Steps
Wait for few days for it to heal but if the pain is unbearable show yourself to a surgeon.
Answered2018-08-18 17:40:58
Let others know if this answer was helpful