David Cameron's party, the Conservatives, have won the general election and will now run the country for the next five years.
At the final count the Conservatives won 331 seats out of the 650 available - more than any other party.
Newsround was following all the action throughout the day, and night, including shocks, surprises, behind the scenes photos and three different leaders resigning.
Here is the story as it unfolded.
David Cameron has made a speech outside 10 Downing Street, announcing that he is going to form a government.
In the speech he thanked Nick Clegg, who he worked with for five years during their coalition government.
He also thanked Ed Miliband, the former leader of the Labour party, saying Ed is someone "in public service for all the right reasons".
The Conservatives have won a majority in the general election, after winning 326 seats.
When a party wins 326 seats or more it can form a government alone.
That means we won't have a coalition government, like we had after the 2010 election.
David Cameron has already driven to Buckingham Palace to see the Queen about forming a government
The leader of the Conservatives, David Cameron, has left Downing Street to visit the Queen.
His party has more seats than any other party, so the Queen will ask David Cameron to form a government.
At the moment the Conservatives have won 325 seats, so at the moment they do not have more seats than all the other parties added together.
But there are still a few areas where the votes are being counted, and the BBC has predicted the Conservatives will win the election with a majority before the end of the day.
Ed Miliband, the leader of the Labour party, has stepped down from the job.
Before the election, surveys suggested it was going to be neck and neck between Labour and the Conservatives.
But in the end, the Conservatives won more seats than expected, and Labour lost some.
Speaking to journalists, Ed said: "I am so sorry for all of those colleagues who lost their seats."
Ed Miliband kept his seat in Doncaster North in the election, and will still be an MP.
Reporters from all around the world are waiting outside the Prime Minister's house.
David Cameron is expected to emerge after 12pm, so he can visit the Queen and speak to her about forming a government.
Nick Clegg, the leader of the Liberal Democrats, has announced he will step down from the job.
He told journalists: "To serve my country at a time of crisis is an honour that will stay with me forever."
Nick Clegg kept his seat in Sheffield Hallam in the election, and will still be an MP.
Earlier, Nigel Farage, the leader of UKIP, also announced he was quitting the job.
He said: "There's a bit of me that's disappointed but there's a bit of me that's happier than I've felt in many, many years."
The leader of UKIP, Nigel Farage, did not win the seat he was competing for in Thanet South.
Across the UK, more than 3.7 million people voted for UKIP - more than the Liberal Democrats and the SNP.
But the Lib Dems and SNP won a lot more seats than UKIP - how did that happen?
To win a seat, candidates need to get more votes than their competitors in their local area.
There are 650 different seats up for grabs. Whoever has the most votes in each area wins that seat.
UKIP had a lot of votes, but they were spread out across the whole country, so the party came second in a lot of places.
The SNP only competed for seats in Scotland, so its voters weren't as spread out.
The Liberal Democrats didn't get many votes across the country, but had a lot of support in a handful of areas.
Chancellor George Osborne, the man in charge of how the government spends its money, says his party is ready to get back to work.
He wrote online: "British people have asked us to complete the job we started 5 years ago of turning Britain around."
"Will get straight back to work on that task," he said.
Hayley asked BBC reporter Ross Hawkins what a win for the Conservatives might mean.
David Cameron has returned to 10 Downing Street in London, the house where the Prime Minister lives.
He will meet the Queen at Buckingham Palace at around 12.30pm and is expected to speak with the Queen about forming a government.
The Conservative Party now looks likely to win most of the seats in the Houses of Parliament.
Our reporter Hayley has been up all night keeping an eye on the election results. After presenting our morning bulletins from Westminster, she's off to get some much deserved sleep.
Ayshah looks at the numbers and explains how many seats David Cameron needs to win the election.
Last night, politician Lord Ashdown said he would "eat his hat" if the prediction that the Liberal Democrats would lose most of their seats turned out to be right.
It is not yet known whether he will take a bite of his hat.
Newsround reporter Hayley is at the Houses of Parliament to bring you the latest news.
Caroline Lucas from the Green Party won her seat in Brighton Pavilion, 8,000 votes ahead of the candidate in second place.
She was the only Green Party candidate to win a seat in the 2010 election, and so far is the only Green Party MP this time.
More than a million people voted for the Green Party, which makes this the party's most successful election yet.
So far UKIP has won one seat. Everybody is waiting to see if the party leader Nigel Farage will win his.
More than 2.5 million people have voted for UKIP in this election.
BBC reporter Chris Mason said: "UKIP is now the third largest party in the UK in terms of nationwide vote."
Ed Miliband, the leader of the Labour party, won his seat in Doncaster.
But the Labour party has not won as many seats as it was expecting, and has lost seats it won in the 2010 election.
Ed Miliband said it had been a "disappointing and difficult night" for his party.
Plaid Cymru, one of the seven political parties to take part in ITV's big Leaders Debate, has kept three seats in Wales.
BBC Wales reporter Hywel Griffith said: "What this campaign has done is raise the party's profile hugely."
"That may not have translated into more seats... but Wood has won a lot of new admirers too, inside and outside of Wales," he said.
Nick Clegg, the leader of the Liberal Democrats, won his seat in Sheffield Hallam.
His party has lost a majority of its seats, performing much worse than experts had predicted.
Nick Clegg said it was a "cruel and punishing" night for his party, and said he will speak about his position in the Liberal Democrats later today.
Former Scottish first minister Alex Salmond won his seat in Gordon for the SNP.
It was a very big night for the SNP, with the party winning almost every seat in Scotland.
"The Scottish lion has roared," said Alex Salmond.
There are so many votes to count, that it takes all night (and some of the next day!) for all the results to be announced.
Reporters have to stay up all night to gather all the news, while the rest of us sleep!
News reporters had a surprise when a survey of voters, known as an exit poll, showed that the Conservatives were going to do better than expected, with Labour performing worse.
An exit poll is a survey of people who have just cast their vote at the polling station.
The news was a surprise because before the election the polls suggested Labour and the Conservatives would be neck and neck.
Voting ended at 10pm and then the ballot papers had to be counted.
50 million people had registered to vote, attending one of 50,000 polling stations - so counting the votes takes all night, and goes on into the next day.
Newsround reporter Hayley was at the big count in Hammersmith. The vote counters wear rubber thimbles to help them get through the ballot papers quickly.