Medications can relax the smooth muscles of the penis allowing the corpora cavernosa to fill with blood.