Let’s start way at the beginning. All eukaryotic cells (which includes any multicellular organism) carry their DNA wrapped up in a chromosome
In any given species the chromosomes are numbered, and chromsome N contains predictable information. For example, the human chromosome 16 contains the DNA to alpha-globin, a component of hemoglobin, the thing that lets your red blood cells carry oxygen. Some people have a variant in their alpha-globin genes that leads to sickle cell anemia. It’s still chromosome 16. The general location and form of the DNA that produces a protein is the gene, different variations are called alleles. So technically it’s wrong to say “the gene for sickle cell”, you need to say “allele for sickle cell”, but everyone knows what you mean.
Many organisms contain more than one version of their chromosomes: the second (or more) chromosome has the same genes but different alleles (unless something goes weird, which does happen but we don’t have time to get into). You are probably most familiar with the human chromosomes: 2 versions of 22 normal chromosomes, an X chromosome, and either an X or a Y chromosome, with Y chromosomes conferring maleness. Having two versions of each chromosome is referred to as being diploid, and it’s not the only choice. Certain sugar cane hybrids have as many as 12 copies of the same chromosome. Some species show variation in ploidy between individuals. This is more common in plants, which can self-fertilize, but is also seen in insects. In humans individual chromosomes are occasionally doubled when they shouldn’t be: this causes death if it’s a big chromosome and things like Down’s Syndrome if it’s not.
Note that the Y chromosome does not contain all the information you need to be male: it releases the signals to be male, and numerous genes on multiple chromosomes respond accordingly.* That’s not the only way to determine sex. Birds, some fish, some reptiles, and a few others species use the ZW system, which is the same as XY except females are the one with the Y chromosome. Many reptiles sex depends on the temperatures their egg experienced (and not every species responds to temperatures the same way). We don’t know how sex is determined in the platypus, which, yeah, that’s about what I expect from the platypus.
Then it gets weird. Fruit flies, and have the equivalent of X and Y chromosomes- but they have anywhere from one to four versons of sex chromosomes, and 2-4 versions of each non-sex chromosome (autosome). All autosomes have the same number of versions, but there may be a different number of sex chromosomes. The sex of a fruit fly depends on the ratio between the # of autosome copies and sex chrosomsome copies.
But what I really want to talk about (600 words in) is haplodiploidy. A haploid cell has only one version of each chromosome, a diploid two. In haplodiploidy, females are diploid, and both male and female produce haploid gametes (egg and sperm). Unfertilized eggs grown into males, and fertilized eggs grown into females- so females have twice as many chromosomes as their brothers. Males have one grandfather and no father at all.
This has a couple of implications. One, most deleterious recessive genes get weeded out right quick, because no male will produce them. On the other hand, such a gene could persist if it boosted female reproduction sufficiently. Second, females can reproduce without males, although they will produce only sons. Which they can then mate with (and inbreeding isn’t nearly as dangerous as it is in diploid animals, because of the aforementioned filter on negative recessive genes), and produce daughters, so a single female can repopulate the planet.
Then there’s relatedness. A human is 25% related to a half sibling (for any given gene there’s a 50% chance it came from the shared parent, and a 50% chance the parent passed it on to the sibling). But a haplodiploid father passes on the same genes to every child, so each sibling is 50% related to each other through him. If the siblings also share the same mother, they are 75% related to each other. That is more related than they could be to their own offspring (50%).**
It was initially thought that this was why/how eusociality developed: it was literally more advantageous to raise sisters than daughters. That’s not strictly true: There are haplodiploids without eusociality, and strict diploids with eusociality. Some eusocial haplodiploid queens breed with multiple males, so their daughters are raising sisters only 25% related to them. But eusociality is heavily overrepresented in haplodiploid animals, so it clearly affects the math.
*Fun fact: the signal for male development in utero is not exactly the same as the signal for male development at puberty, and it’s possible to be unable to produce the fetal signal but successfully produce the puberty signal, producing babies that are born with female external genitalia but grow a penis and testicles at puberty (nearly all of these children identify as men as adults). This was common enough in certain villages in the Dominican Republic that they have a name for it, which translates to “penis at 12.” It’s considered a joyous thing because sons are more valued than daughters.
**But aren’t their sons 100% related to them? Yes. But relatedness is not necessarily reciprocal. A gene in a female has only a 50% chance of being in a given son, so she is only 50% related to him.