The ability of the Prime Minister to call an early General Election is one that was changed during the 2010-15 Coalition government. The process of being able to do so relies upon two events set out in the Fixed Term Parliament Act.
In the past, the Prime Minister could call a General Election whenever they wanted. This was used to their advantage, so whenever the economy was strong, employment high or (in Margaret Thatcher’s case) Britain had won the Falklands War, the Prime Minister would have a better chance of winning the election. The coalition of 2010-2015 put in place a restriction on the Prime Minister being able to do this and set that elections would be held every five years.
One event that can call an early General Election is if the government has a Vote of No Confidence passed against it. This has not happened since 1979 when the Fixed Term Act was not in place and therefore we haven’t seen how this works in practice.
The second event is specifically if the PM wants to call an early General Election. They have to pass this through Parliament with the support of two thirds of MPs, also known as a supermajority. So, when Theresa May announced that she planned to hold a General Election in 2017, really what she was announcing was a vote in parliament on holding one.