In the Republic of India, a chief minister is the elected head of government of each of twenty-eight states and two (three after 31 October 2019) union territories. According to the Constitution of India, the Governor is a state's de jure head, but de facto executive authority rests with the chief minister. Following elections to the State Legislative Assembly (Vidhan Sabha) in a state, the state's governor usually invites the party (or coalition) with a majority of seats to form the government. The governor appoints and swears in the chief minister, whose Council of Ministers are collectively responsible to the assembly. Based on the Westminster system, given that he retains the confidence of the assembly, the chief minister's term can last for the length of the assembly's life--a maximum of five years (except in Jammu and Kashmir Legislative Assembly where it is maximum of six years). There are no limits to the number of terms that the chief minister can serve. A chief minister heads a state government's council of ministers and can be deputed in that role by a deputy chief minister.
The Constitution of India sets the principle qualifications one must meet to be eligible to the office of the chief minister. A chief minister must be:
An individual who is not a member of the legislature can be considered as the chief minister provided he/she gets himself/herself elected to the State Legislature within six months from the date of their appointment. Failing which, he/she would cease to be the chief minister.
The chief minister is elected through a majority in the state legislative assembly. This is procedurally established by the vote of confidence in the legislative assembly, as suggested by the governor of the state who is the appointing authority. They are elected for five years.  The chief minister shall hold office during the pleasure of the governor.
Since, according to the constitution, the chief minister is appointed by the governor, the swearing in is done before the governor of the state.
The oath of office.
I, , do swear in the name of God/solemnly affirm that I will bear true faith and allegiance to the Constitution of India as by law established, that I will uphold the sovereignty and integrity of India, that I will faithfully and conscientiously discharge my duties as a Minister for the State of and that I will do right to all manner of people in accordance with the Constitution and the law without fear or favour, affection or ill-will.-- Constitution of India, Schedule 3, Para 5
The oath of secrecy
I, <Name of Minister>, do swear in the name of God/solemnly affirm that I will not directly or indirectly communicate or reveal to any person or persons any matter which shall be brought under my consideration or shall become known to me as a Minister for the State of <Name of the State> except as may be required for the due discharge of my duties as such Minister.-- Constitution of India, Schedule 3, Para 6
In the event of a Chief Minister's resignation, which conventionally occurs after an election or during a phase of assembly transition, the outgoing minister holds the informal title of "caretaker" chief minister until the Governor either appoints a new chief minister or dissolves the assembly. Since the post is not constitutionally defined, the caretaker chief minister enjoys all the powers a regular chief minister possesses, but is expected not to make any major policy decisions during his/her short tenure as caretaker.
By Article 164 of the constitution of India, remuneration of the chief minister as well as other ministers are to be decided by the respective state legislatures. Until the legislature of the state decides salary, it shall be as specified in the second schedule. The salaries thus vary from state to state. As of 2019, the highest salary is drawn by chief ministers of Telangana, which is (US$5,900) and lowest by the chief ministers of Tripura which is (US$1,500).
Various states throughout the history have appointed Deputy Chief Ministers. The position has been long debated in view of constitutional stand. Various deputy chief ministers have also taken the oath of secrecy in line with the one that chief minister takes. This oath has also sparked controversies.