Thanks for your query.Based on the facts that you have posted it appears that you have
what is called as Phimosis
However this can be confirmed only on clinical examination by a qualified General Surgeon
Please go ahead and if it is confirmed to be Phimosis You need to undergo an small surgery of Circumcision
.This is a simple surgery carried out under local anaesthesia as a out door surgery and offers permanent solution to your problem and will help to have pain free and enjoyable sex in future.