Every person has two sets of chromosomes, each set with 23 chromosomes. One set is inherited from mom, one set from dad.
When gametes (egg or sperm) are formed, each gamete produced will have a single set of chromosomes instead of two sets. But when the cells divide and chromosomes assort into the daughter cells that become gametes, they assort randomly. In other words, when you make an individual gamete, it's random which set each gamete gets and it will be a mix of sets from your mom and dad. So one gamete may have 20 chromosomes from one set and 3 from the other. But another gamete may have 10 chromosomes from one set and 13 from another.
Because of this, siblings on average will share about 50% of their genes, but some may share more and some may share less.