Viagra, officially known as sildenafil, is a prescription medication primarily used to treat erectile dysfunction . It functions by increasing blood flow to the penis, facilitating an erection in response to arousal . While generally safe when taken as directed, potential side effects may include