It is this trapped fluid in erectile tissue that makes the organ firm.
From the time.com
And it also dilates the blood vessels leading to the erectile spaces in the penis, allowing that organ to become engorged with blood-hence the connection with you-know-what.