The drug is a widely known treatment for erectile viagra 58 dysfunction , helping individuals achieve and sustain a strong erection . Originally developed for heart problems , its unexpected effect on sexual function led to its current role as a treatment . Understanding how it works involves inhibiting an enzyme called phosphodiesterase type 5 ,