X-inefficiency at output q is the difference between the realized cost of production at q and the minimum cost of producing q.

If firms are maximizing profits, the difference is zero.  But there are many reasons why they might differ.  One is lack of competition.  The rough argument is that a monopoly has less incentive to minimize costs because it can absorb X-inefficiency in the form of reduced profits without going bankrupt.  Here is a video of X-inefficiency: