When a domain expires and is not renewed, the registrar eventually deletes it. For gTLDs the registry does not release the name at once: it sets the status redemptionPeriod and removes the domain from the zone, so website and email are down. For about 30 days the previous registrant can ask the registrar to restore the name; the registry charges a restore fee on top of the renewal, and registrars pass it on.
If nobody restores it, the domain moves to pendingDelete for about five days, during which nothing can be done, and is then deleted and becomes available for anyone to register. Desirable names are often caught within seconds by automated drop-catching services.
These are gTLD rules. Country-code registries use their own procedures and names: some have a similar quarantine period, others release names much faster. A lookup that shows redemptionPeriod or pendingDelete means the domain is on its way out, not that it can be registered today.
Example
Domain Status: redemptionPeriod
Domain Status: pendingDelete