Funds get blocked for a few blocks while sending/getting a transaction.

What is the purpose of it and how does it work?