With hypospadias and epispadias, the prefix -hypo means below, - epi means above, and the suffix -spadias refers to a slit or opening.
So instead of having an opening at the tip of the urethra, hypospadias refers to an abnormal opening on the bottom of the urethra and epispadias refers to an abnormal opening on the top of the urethra, and both of these can happen in boys and girls, but are way, way more common in boys.
During genital development in the fetus, there's a point in the 8th week of gestation, when both boys and girls have a similar bit of tissue called the genital tubercle which normally grows in the cranial direction, meaning that it grows towards the head.
After that point, in boys, the genital tubercle responds to the hormone dihydrotestosterone and stretches out a bit into a primitive phallus.
As it grows in length, an area of tissue on the underside called the urethral plate invaginates to form a urethral groove which is lined with epithelial cells.
In the 14th week of gestation, the two urethral folds on the sides pinch off the groove to make it close, and form the penile urethra.
In the 17th week of gestation, the ectodermal cells of the glans penis or head of the penis also undergo a process of canalization, and the urethral canal connects with the penile canal, and that means that the urethra eventually meets the outside world at the tip of the penis.
In a boy, hypospadias happens when the urethral folds along the penile urethra don’t meet up and close properly.
And that leaves an opening somewhere along the bottom of the penile shaft and urine can leak out at that spot, instead of going out the tip of the penis like it should.