Last in first out (LIFO) is a method of valuing stocks (inventory) for accounting purposes. Stocks issued (for sale or further processing) are assumed to be the most recent purchases, the opposite assumption to that made by FIFO.
The advantage of using LIFO is that the prices used to calculated the cost of sales, and therefore the gross profit number, are more recent: and therefore more closely reflect their economic value.
Given positive inflation, LIFO reduces profits (as the most recent cost goes to the profit and loss account) and it tends to understate the value of stocks in the balance sheet. Under deflation the opposite is true.