The penis is made up of two sorts of flesh: the corpus cavernosum and corpus spongiosum.
The two cavernous bodies are cylinders, situated on the top side of the penis, which swell when erect, to give the penis its rigidity.
The spongey bodies are on the underside and also swell during erection, but do not become hard, giving the penis its suppleness, to allow it to adapt to the size of the vagina.