The mining nodes compete to find a SHA256(SHA256(x)) hash of the the block that starts with a predetermined number of zeros.
The first mining node (or node pool) to generate the winning hash collects a prize and increments the block count. (note this currently appears to take 30 minutes, and the block size is limited to 1MB)
The miners notify a wallet who then replicates the new block to anyone who requests it, and pushes the updates to a certain number of peers. Any block with a date difference greater than 120 minutes of system time is discarded.
Any in-flight transactions that reference the solved block have to be resubmitted by the original client and refer to the current block.
The wallet will keep track of any forked chains and the chain with the most computational power backing it wins. This fork may occur due to netsplits or malicious activity). In addition no single wallet or central authority currently knows of all the invalid transactions, or forks that have occurred in the network.
Once 100 (or 120) confirms have been sent, the BTC generated with the block may be spent. source
The lifetime of a transaction would be something like this:
You start with a client, a wallet that contains your keypairs, and some unspent transactions (you get those from other people or through mining).
You create a new transaction spending some of your unspent Bitcoins, sign it with your private keys. Your client will store a copy of it.
Your client starts to broadcast the new transaction through the Bitcoin Network. As far as I remember it doesn't broadcast it to every peer, but to every 8th peer in order to protect your anonymity. Every minute the client will also broadcast all transactions it knows about to one of its peers, which would also include your new transaction.
Every client that receives your transaction scrutinizes it - they check whether the signature is okay, whether there are any errors, and whether you are trying to perform a double-spend. If your transaction fails any of the criteria, it is ignored by the client entirely. Otherwise the client keeps a note of the transaction in temporary memory.
All the clients that know about your transaction follow a similar route of broadcasting as you did - send it to 1/8 peers, and then to one peer every minute. They will also not broadcast your transaction if its fee is too small at a given time (which varies on the amount of transactions to be included in a block and so forth). Generally, if you don't pay fees, you get punished with slow transaction broadcast rate right here.
Eventually your transaction reaches some mining pools and the recipients of the transactions. The latter will see the new transaction in their wallets and store a copy of it indefinitely, but it will appear as 0 confirmations. The mining pools will see it as a new transaction and (most likely) will include it in every block they try to create. They will store a local copy of the temporary blocks and give out the corresponding work to solve to their miners.
The miners don't know anything about your transaction, other than with one or more transaction it hashes to a given merkle root. Their job is to crunch numbers, not to check for block validity, as that's a task for the pool.
Eventually your transaction is included in a block that gets solved. It gets broadcasted proudly through the Bitcoin network and everyone keeps a note of it from now on (to know if some new transaction conflicts with it in a double-spend attempt). Now your transaction has 1 confirmations.
The block creation process continues, and as more and more blocks build atop the block your transaction gets included, it gains more confirmations. Eventually reaching 6 and more confirmations, it is considered fully confirmed.
The transaction finishes its live cycle once it is spent by another transaction, meaning that its outputs can be forgotten from the "unspent" memory and disregarded for any other attempts to spend them. It will, however, remain in the blockchain for as long as people will keep track of the full chain.
There are a few complications during 51% attacks and so forth, but this is the main flow of a standard transaction.