The first (and possibly most important) thing that happens when your domain expires is that it stops working. Its name servers are withdrawn from the registry's master DNS servers and replaced with "parking" records by the registrar.
These parking records will cause ads to be shown on your domain. (This unfortunate policy is ubiquitous in the wholesale registrar industry that we have to use to register domains. It is not something we have control over, and not something we profit from.) Due to the 48-hour TTL (time-to-live) records used for name server glue records by the domain registries, these ads may continue to display for up to 48 hours after an expired domain is renewed.
In addition, at the time of expiration, the domain's publicly-visible contact information becomes frozen and cannot be changed under most circumstances. This has implications for domains with RespectMyPrivacy.
After expiration, your domain enters the "renewal grace period." This is (usually) a 30-day period* during which the domain can be renewed at the regular cost. If you renew during this period, your domain will be reactivated immediately, but it can take up to 2 days for the renewal to be visible all over the Internet.
After the renewal grace period, the domain enters the "redemption grace period," during which its status will be listed as "queued for deletion" or "pending delete restorable." During this period, usually 30-35 days**, the domain can still be renewed, but it costs a lot more.
(Any renewal during either grace period will be effective as of the original expiration date; you can't get extra time by renewing after the domain expires, nor do you lose time by renewing early.)
After the redemption grace period, the domain enters the "pending delete" status, where it typically remains for five days. It cannot be renewed during this period. After that, the domain is really, really gone and is free to be re-registered. Thus, the average domain can linger for as long as 75 days after deletion.
For awhile, it was the case that virtually every deleted name was instantly snapped up by speculators, but as of August 2008, that seems to be somewhat less common than it was. Nonetheless, the more valuable your domain is, the more crucial it is that you not take the chance.
*The length of the grace periods is not set by us and changes from time to time without notice to us. Thus we can't guarantee the lengths referenced here. Renew your domain as soon as you can if you care about it.
**Redemption grace period lengths also vary by TLD. For example, the .NAME domain currently provides only a five-day redemption grace period.