Humans have 23 pairs of chromosomes because 23 chromosomes come from the father and the other 23 come from the mother, and thus humans end up with 46 chromosomes.
With 23 sets, you have two copies of each gene.
This is what happens in normal situations. However, in some cases during cell division, there could be more or less that 46 chromosomes.