There are indeed some problems with the teacher's explanation as given in the question.
First, the company is not a State that make laws or a Court which tries anybody.
That is absolutely correct. The Equal Protection clause limits what state governments can do, It does not limit what a private company may do. However, States can pass laws restricting what private companies can do A state can, for example, pass "equal pay" laws, limiting the ability of a company to pay workers different amounts for similar jobs. But such laws are not mandated by the equal protection clause, in fact that have nothing to do with that clause.
But still, law exercises its role of protection to people through Police or Courts, paying instalments of life insurance is not a legal protection.
Equal Protection applies to all operations of a state government (or of state agencies and local governments created by the state). It is by no means limited to "Police or Courts". It may affect payments to state or local government employees.
Equal Protection applies only when someone is convicted or comes under the ambit of legal punishment.
This is not at all correct. While unequal punishments for crimes may well raise Equal Protection issues, it is not the only or indeed the most common situation for such issues to come up. Equal protection issues can arise in any circumstance where the state government is treating people who are in similar circumstances differently without a good reason. (What constitutes a good reason varies, is complex, and often winds up decided by the courts.)
For example, where districts for the state legislature are of significantly different sizes, so that different people have effectively unequal voting strength, Federal courts may require changes in the district maps on Equal protection Grounds. If a state law treats men and women differently, there may be an Equal Protection violation. And of course, if it is alleged that a state government treats members of one race differently from members of another, that would be an Equal Protection claim. Many other circumstances are possible.
For example: if a person of a particular religion is prevented from entering a restaurant, he is surely offended, but he cannot sue the restaurant on grounds of Equal Protection of Law.
No, that would not be an Equal Protection violation, unless the rule denying entry was required by state law, as racial segregation was required in many places during the "Jim Crow" era. But such a restriction would violate both State and Federal anti-discrimination law. Currently every state has such laws, and they would all make such action by a restaurant owner unlawful.
I understood it as: if a President/Prime Minister commits a murder he shall be tried in the same may as any other private citizen would have been had he committed a murder.
While a law which treated a government official accused of crime differently than a citizen who is not an official would probably be an equal protection violation, that is not a major application of the Equal Protection clause of the Fourteenth Amendment, and was never the major purpose of it.
In fact the original purpose was to prevent, in the aftermath of the Civil War, laws that treated Blacks differently than Whites. But the clause has a much wider scope than that.
However, a high official does in some cases have the authority to do or order things that would be criminal if done by a person without such authority. For example, The President can order military action which results in people being intentionally killed. In other circumstances, intentional killing would be murder or some other crime.
But a President accused of an act not justified by that person' lawful powers should be traded just as anyone else would be. For example, Vice President Spiro Agnew was accused of accepting bribes (before he became Vice President) and resigned from office as part of a plea agreement.
One exception: A US Justice Department Opinion says that a sitting President should not be criminally charged. This has never been tested in court, and is not a law, merely a legal opinion.