I works only in the erectile tissues. Here’s a paragraph from a position paper (pdf) by a medical insurance company regarding the use of oral phosphodiesterase-5 inhibitors:
Sexual stimulation causes the release of nitric oxide from nerve endings and endothelial cells in the corpus cavernosum. Nitric oxide activates the enzyme gaunylate cyclase resulting in increased synthesis of cyclic guanosine monophosphate (cGMP) in the smooth muscle cells of the corpus cavernosum. The cGMP leads to smooth muscle relaxation, allowing increased blood flow into the penis, resulting in an erection. The synthesis, degradation and resulting tissue concentration of cGMP is regulated by phosphodiesterases. The most abundant phosphodiesterase in the corpus cavernosum is PDE5. Therefore, the inhibition of PDE5 enhances erectile function by increasing the amount of cGMP in the corpus cavernosum. Sexual stimulation is required to initiate the local release of nitric oxide; therefore, PDE5Is have no effect in the absence of sexual stimulation.
Some of the inhibitors, especially Viagra, work elsewhere in the body (blue vision, etc.), but I believe the newer drugs target the penile erectile tissues better.