When I go in the ocean my scrotum shrivels and hurts but I don't know why?

Cold & dartos muscle. Dartos muscle lines inside of the scrotal skin. This contracts when scrotum is exposed to cold ocean water. Same occurs with a cold shower or bath. It is normal physiology.