Viagra is a medication used to treat erectile dysfunction. It works by increasing blood flow to the penis, allowing for a firm and lasting erection. It should be taken 30 minutes to 1 hour before sexual activity, and its effects can last up to 4 hours. Viagra is a safe and effective treatment option for men experiencing difficulties with their sexual performance.