What does it mean to lose your deposit in the General Election?

The results of election night saw a number of candidates lose their deposits – but what does that mean?
Countine the votes.Countine the votes.
Countine the votes.

Every candidate standing in the General Election must pay a deposit of £500, which is forfeited if they fail to gain five per cent of the vote in the constituency in which they are standing.

The deposits are designed to put off candidates who are not serious about running in the election from standing.

During what was a bad night for the Liberal Democrats, a Twitter account guessing how much they lost in deposits was even set up as the results began to be announced.