A man gets an erection when he is sexuallyaroused or spontaneously (for example during a wet dream). The penis becomes erect.