When a ticket buyer selects tickets for purchase, the tickets are placed into their cart. When tickets are in a cart they are unavailable to other ticket buyers. If the ticket buyer selects the last of available tickets it results in the ticket type displaying "sold out." However, until the transaction is complete, it will appear in the backend that you still have a ticket inventory left. Once the transaction is complete your current ticket inventory will be reflected in the backend.
As an example, if you have 48 out of 50 tickets sold and someone selects those last 2 tickets, the ticket type will display as "sold out" because even though the transaction is not yet complete, those tickets are already claimed, no one else can try to purchase them. If the transaction times out or the ticket buyer leaves the transaction those tickets will be released and someone else can purchase them.