4P4 means the number of ways (permutations) of arranging 4 items from a collection of 4 items.
There are 4 choices for the first item,
and for each of these, there are 3 remaining choices for the second item (or 4×3=12 choices for selecting and aarranging the first 2 items),
and for each of these, there are 2 remaining choices for the third item (or 4×3x2=24 choices for selecting and arranging the first 3 items);
and for the fourth item, there is only 1 item left; giving 4×3×2×1=24 choices for selecting and arranging the 4 items).
As a formula
XXXnPk=n!(n−k)!
So (remembering that 0!=1 by definition)
XXX4P4=4!0!=4×3×2×10!=24