Old thread but basically LIFO and FIFO are different inventory valuation methods.
Basically assume you are a retailer selling a homogeneous product (widgets). Typically prices change over time, and usually with inflation, they increase. Here's a simplified example but should illustrate the point.
e.g. On 1 January 2015, widgets are sold by a distributor for $10 each. On 1 January 2016, the same widgets now sell for $15 each.
If you sold one of those widgets on 2 January 2016 for $20, what should your gross profit (revenue less cost of goods sold) be? Under LIFO, it would only be $5 ($20-$15) whereas under FIFO it would be $10 ($20-$10). Lower profit means lower tax.
(side note; I wouldn't go as far to say it's outright illegal to use LIFO since in some cases you can but need to be able to justify it through other considerations; e.g. Parcels of securities for CGT).