One X or two changes everything
The 23rd pair are the sex chromosomes. Typically, people with two X chromosomes (XX) develop as female, and those with one X and one Y (XY) as male. The Y is small and carries few genes; the X carries hundreds. So for an X-linked gene, an XX person has two copies while an XY person has only one. A sex-linked trait is one whose gene lives on a sex chromosome — and that lopsided dosage is what makes its inheritance pattern unusual.
X-linked recessive: why it favors males
An X-linked recessive trait needs a recessive allele on every X present. An XY person has just one X, so a single recessive copy is enough to show the trait. An XX person needs the recessive allele on *both* X chromosomes — much rarer — and an XX person with just one copy is an unaffected carrier. This is why conditions like hemophilia and Duchenne muscular dystrophy appear far more often in males.
X-linked recessive: carrier mother (X^A X^a) × unaffected father (X^A Y)
(X^a = recessive allele; lowercase a)
X^A X^a
--------------------------
X^A | X^A X^A | X^A X^a | <- daughters
--------------------------
Y | X^A Y | X^a Y | <- sons
--------------------------
Daughters: 1 unaffected : 1 carrier (none affected)
Sons: 1 unaffected : 1 affected (X^a Y)
=> Half of sons affected; daughters are carriers, not affected.X-linked dominant, and a word on the Y
An X-linked dominant trait shows with even one copy on an X, so both XX and XY people can be affected. The giveaway is again in the fathers: an affected XY father passes the trait to all of his daughters (they all get his X) and to none of his sons (they get his Y). An affected XX mother, by contrast, passes it to about half of all her children regardless of sex.
Genes on the Y chromosome are passed strictly from father to son, generation after generation, so a Y-linked trait appears only in males and never skips down the male line. Because the Y carries so few genes, true Y-linked traits are uncommon, but the pattern is the cleanest of all to recognize.