If order matters, then there are 12 ways to do this
If order does not matter, then there are 6 ways to do this
===========================================
We have 4 choices for the first slot and 3 choices for the next (we can't reuse a letter) so that's where 4*3 = 12 comes from
If order doesn't matter, then something like AB is the same as BA. So we are doubly counting each possible combo. To fix this, we divide by 2: 12/2 = 6
To be more formal, you can use nPr and nCr to get 12 and 6 respectively (use n = 4 and r = 2)