FIFO and LIFO are both methods of determining the basis of an asset in the hands of a seller.
FIFO stands for first in first out. This means that if you paid for a virtual currency on three occasions and you spent $1, $20 and $100 for each coin, when you sell a coin, the basis will first be taken out of the first coin you purchased. For example. If you sold the first coin for $50 and the first coin you purchased cost $1, you would pick up a $49 gain.
LIFO, on the other hand, stands for last in first out. This means that the last coin you purchased is the first coin you sell. In the example above, if we were instead using LIFO and we sold a coin for $50 and the last coin you purchased cost $100, you would instead be picking up a loss of $50 instead of a gain of $49.
It is important that once you select a method you are consistent throughout the year.