An erection begins with sensory or mental stimulation, or both. The stimulus may be physical—touch, sound, smell, sight—or a sexual image or thought. When the brain senses a sexual urge, it sends impulses to local nerves in the penis that cause the muscles of the corpora cavernosa to relax.