An erection is when the penis fills with blood and stiffens, which can happen during the day or at night while a person is sleeping. During puberty, it's not uncommon for people with a penis to even experience erections for no reason. Erections can also happen before puberty, but they are more common and more frequent during this developmental stage.