First let's look at the case where order matters. The number of possible first cards is $ x $, the number of possible second cards is $ x - 1 $ (since the first one is no longer available), and the number of possible third cards is $ x-2 $. The total number of three-card hands, where order matters, is then $ x(x-1)(x-2)$. However, given any three distinct cards, there are $ 3! = 6 $ different ways to order them all, e.g.
ABC ACB BAC BCA CAB CBA
Hence our value of $ x(x-1)(x-2) $ contains 6 copies of every possible three-card hand (without ordering). Thus the value you are looking for is $ x(x-1)(x-2)/6 $. Note that, in general, the number of ways of choosing $ m $ objects out of a collection of $ n $ objects, without order, is determined by the binomial coefficient:
$ {n \choose m} = \frac{n!}{(n-m)! m!}, $ which can be derived by the same reasoning process used above.