the big difference is that 5 days are scheduled for a game of test cricket, everyone's expecting it and enjoy it accordingly, if it's not finished after 5 days the game is declared a draw.
There are various forms of cricket. What you're referring to is test cricket. However, the shorter forms of the game can last as little as 3 - 4 hours.