Bitcoin transactions are saved in a ledger. There needs to be a way for everyone to agree on the same ledger. In bitcoin this is done by making sure that the only valid ledger is the one where more computing power was put into it to "generate it". There's a lot of other details, where the ledger is actually a block chain, but overall the idea is that of "the most computing power" is the rule behind how nodes accept the main ledger.
With this in mind, it still could happen that someone with a large amount of computing power may create a ledger that replaces the one that is currently accepted by the network. Because of how the block chain works, this is exponentially harder to do for every block in the ledger that is generated/found.
So to answer your question to "why is it that we need to wait for 5-6 confirmations", it's because a malicious party with lots of computing power could hypothetically replace the latest 2 blocks or so. But, to replace the latest 5 or 6 blocks it becomes so hard that it's virtually impossible for it to happen. Therefore, a transaction without any confirmations is "less secure" than a transaction with 5 confirmations. The more the confirmations, the more secure a transaction is.