Avanafil is used to treat erectile dysfunction. It works by increasing blood flow to the penis during sexual stimulation. This increased blood flow can cause an erection. Avanafil does not cure erectile dysfunction or increase sexual desire. Avanafil does not prevent pregnancy or the spread of sexually transmitted diseases such as human immunodeficiency virus (HIV).