Average cost: what you paid
If you bought the same thing several times at different prices, your average cost is what you paid per unit overall. It's the line your gain or loss is measured from.
Buying in steps
Say you bought 10 shares at $100, then 10 more at $120. You paid $2,200 for 20 shares: an average cost of $110 each. That's the dashed line Allown draws on an asset's chart.
Gain or loss
If the share now trades at $130, each one is $20 above your average cost: a gain of $400 on paper (unrealised). It becomes realised only when you sell.
Selling doesn't change it
Sell 5 of your 20 shares and the 15 left still cost $110 on average. Your average only changes when you buy more.