Two types of penile prosthesis exist, depending on the mechanism of rigidity: the inflatable penile implant, and malleable/semirigid penile prosthesis.
The Inflatable Penile Prosthesis
The inflatable prosthesis is made of two soft, long cylinders that are connected to a small fluid-filled pump. The two cylinders are placed inside the two corpora cavernosa. The pump is placed inside the scrotum next to the testis. When the pump is pressed, fluid leaves the pump and fills the cylinders expanding them and rendering them rigid. The cylinders occupy the whole length of the corpora cavernosa, thus result in rigid erection of the penis when filled.
When one desires to undo erection in case an inflatable prosthesis is implanted, he presses the top of the pump or the penis itself (according to the model of the inflatable prosthesis). Fluid flows out of the cylinders making them soft again, and the penis shrinks back to normal.
The Malleable Penile Prosthesis
The semirigid / malleable is different. It is composed of a long silver wire that can be bent and straightened. The silver wire is surrounded by a firm cylinder of silicon that has the feeling of a rigid penis. The cylinder can be bent or straightened as desired. When straightened, it stays straight and rigid.
Two cylinders are inserted, one in each corpus cavernosum, in the same way an inflatable prosthesis is implanted (see before). When one has a semirigid / malleable prosthesis implanted and he desires erection, he straightens the penis with his hand, and it stays erect as long as he needs. When he is done, he bends the penis downwards so that it does not show underneath his pants, but it stays rigid (though bent).