Factorial means n! = (n)(n-1)(n-2)… etc. down to 1, where n is a positive integer. It’s used to calculate the different number of configurations of a set of elements, mainly in combinatorics.
Like if you have four different objects and you want to know how many different configurations you can order them in, you have four choices for the first object, then three for the second, then two for the third, then one for the final slot. So the answer is 4 x 3 x 2 x 1 = 24 = 4!.
They’re used in permutations and combinations a lot. Combinations is pretty obvious based on the name. Given X things, how many ways are there to choose Y. Permutations are the same but where order matters.
For example, if you shuffle a deck of cards properly randomly there will be 52! possible orderings (permutations).