My penis hurts after sex, why?

Penile pain? This can be due to several reasons. Your partner has used something to which you are allergic, you have traumatized the penis by overaggressive thrusting or the position was traumatic, etc. If this keeps up it may help for both you and your sexual partner to see a doctor together and work this out face to face with a caring clinician.