Initially, the average cost of an item is the same cost that the user has entered in the edit item dialog.
When the user creates a "Receive from Supplier" transaction, the average cost of an item is computed based on the value and quantity of the item received. It is a moving average computed based on historical transactions. The "Return to Supplier" transaction has the opposite effect.
For example:
Initially, user created an item named "T-shirt" and entered $18 in the edit item dialog -> Average cost is $18
User received 10 "T-Shirt" with cost of $20 -> Average cost is now $20
User received another 10 "T-shirt" with cost of $22 -> Average cost is now $21
User returned 10 "T-shirt" with cost of $22 -> Average cost will be reverted back to $20
Only "Receive from Suppler" and "Return to Supplier" affect on average cost. Any other transaction including "Adjustments" has no impact on the computation of average cost.