Generic Viagra pills are used by men who have difficulty obtaining an erection. Depending on what your doctor thinks, it might also be used for other issues. It treats erectile dysfunction by relaxing the muscles in the blood vessels of the erection. An erection can only occur when a person's desire is stimulated. This increases the quantity of blood flowing to the erection.