Hemophilia is a genetic bleeding disorder that happens when there are changes or mutations in certain genes that help with blood clotting. There are two main types: Hemophilia A, which is caused by a problem with a gene for clotting factor VIII, and Hemophilia B, which is caused by a problem with a gene for clotting factor IX. These important genes are found on the X chromosome.
Since boys only have one X chromosome, they can get hemophilia if they inherit the mutated gene from their mom. On the other hand, girls have two X chromosomes, which means if one is messed up, the other one usually works fine and can take over. That's why hemophilia is much more common in boys than in girls.