5 friend are buying tickets.HOW MANY COULD THEY LINE UP.

I suppose you mean how many ways could they line up.

Think of who goes first: 5 choices,
who goes next: 4 choices,
...
who goes last: 1 choice.
So by the multiplication principle, there are 5.4.3...1 ways.