Lots are composed of all the Position Units of an Asset that were were initiated by the same Transaction.
Every time you execute a purchase, you open a new Lot. Should you sell only a portion of this Lot, the sold part is deemed closed, while the remainder continues to be open.
For a more detailed explanation, you can refer to the Investopedia article on Tax Lots.