Oral medications, known as phosphodiesterase type 5 (PDE5) inhibitors, work by increasing blood flow to the penis, facilitating an erection when sexual stimulation occurs.