FIFO has the possibility of giving you higher profits since you sell the goods you bought earlier (and probably cheapest) first, and LIFO will give you lower profits if you have a large holding of stock compared to sales volume. In the UK, FIFO is the standard as it intuitively feels better - the item of stock you bought first, you sell first.
The methods First in First Out and Last in First Out have been explained by another answerer. But you have to check with the Inland Revenue Authorities as to which one is permissible. Some countries give you then freedom to choose either one but remain consistent. The advantages and disadvantages change with an era of rising or falling prices.