The Prime Minister is appointed by the President. But he cannot appoint anyone he likes. He appoints the leader of the majority party or the coalition of the parties that commands a majority in the Lok Sabha, as Prime Minister. In case no single party or alliance gets a majority, the President appoints the person most likely to secure majority support.