So much misinformation on popular media - here's what will happen post Thursday:
It is very clear from the processes within the Cabinet Manual what should happen in the event of a single party not having an overall majority.
Firstly the continuation rule is applied, i.e. the previous incumbent is entitled to see if he/she can command the confidence of the house.
In the event of that not being possible the incumbent resigns and the Queen will "invite the person who appears most likely to be able to command the confidence of the House to serve as Prime Minister and to form a government”. This is the gravitational principle, according to which the person mostly likely to succeed at the task is entrusted with forming the government.
Nowhere does it state that this person must have the largest number of seats in the House (the plurality principle), only that he/she can command the confidence of the House.
This principle has been in force since the mid 19th century
There is an alternative principle that was last used in 1924 when removing Baldwin's Government. This is when the party deemed responsible for stopping the previous incumbents from regaining power is asked to form a Government and is known as the fault principle. Following the Fixed Term Parliamentary Act of 2011 this may well be used in asking Labour to form a minority Government with the confidence of the House.