The Prime Minister in the UK is the leader of whichever party controls Parliament (or the largest party in a coalition that holds Parliament), and is also a Member of Parliament.
In the current, close, general election, the incumbent conservatives are floating the idea that if Labour needs to join with the Scottish National Party to form a government, and the conservatives have the most seats of any party in Parliament, the conservatives will declare victory on the grounds that the alternative government would be illegitimate, and attempt to retain executive power.
This claim is based on the fact that the SNP wish to desolve the Union. Liberal commentators see this threat as basically unconstitutional and tantamount to a coup. There are also more mundane possibilities in the election, including a hung parliament or straightforward victory.
Its important to note that the Tories are still in power even though parliament dissolved, and will be until Cameron decides to resign or he loses a no confidence vote in Parliament, (Which wouldn't be until Parliament reopens on the 29th of May) so its less the Tories declaring victory but just refusing to leave if they declare the other side not to have a mandate.