Sometimes erections happen quickly, sometimes not, but the process is generally the same: The brain sends chemical messages to nerves in the penis, which signals the blood vessels to relax and fill with blood, causing the penis to stiffen.
During an erection, the penis can also get darker in color and the head can grow bigger. The testicles (balls) draw in close to the body, instead of hanging loosely.