- When a professor is Michael Ernst (I suppose Michael is first name, and Ernst is last name), we call him Prof. Ernst or Prof. Michael?
- When his close friends call him, should they call him Michael, or Ernst?
- I see that he has called himself Mike, what is the reason?
You are correct that Michael is his first name, and Ernst is his last name, also known as surname or family name.
When addressing someone using a formal title, such as "Professor", you would typically use the last name. In this case, it would be "Professor Ernst", or "Prof. Ernst". Note the use of a period to indicate the abbreviation of "Professor" as "Prof.".
Close friends typically address each other by their first name, which in this case is "Michael". However, the last name is sometimes used informally among friends, as a nickname. As an aside, you mistakenly wrote "closed friends" in your question, instead of "close friends".
"Mike" is an informal alternative to "Michael". This is technically referred to as a diminutive, but may also be called a nickname. Similarly, someone named "Robert" may go by the less formal alternative, "Bob". However, as a matter of politeness, you should typically start out with the more formal version of the name, unless you are fairly certain that they typically prefer the diminutive. In this case, if Professor Ernst has referred to himself as Mike, it is safe to assume that you should, too.
Yes, in the name Michael Ernst, Michael is the first name, while Ernst is the last name, family name, or surname (all three mean the same). Generally when referring to someone by title you will use their surname. In this case, Professor Ernst. However, some persons wishing to retain informality with their title may prefer to be called by their first name, as in Professor Michael. More often than not, however, it is Title Surname. Therefore, except in matters of personal preference by the person you are addressing, the formality is best: Professor Ernst.
Most people prefer go by their first names among their friends, but it is a matter of preference. So usually Michael is what his friends would call him. However, people that have been in a lot of sports, the military, or other professions that require specificity in naming may choose to use their surname as the name their friends call them. Or they may choose another name entirely, sometimes based on their formal first name, and sometimes not. This is called a nickname, which I'll explain more in #3.
"Mike" is a shortened form of "Michael" often used informally, called a nickname. Many who have long formal names will be called by a shorter name. For example, someone named "Joseph" might be called "Joe". However, one cannot assume that just because people call a person Mike that their formal name, or given name, is Michael. Some people were given the shorter version of the name at birth.
Complicating the matter, Americans often take nicknames which are sometimes easy to tell from the formal name, and sometimes not. For instance, a person whose name is "Richard" may go by "Dick" as a nickname. It's just how these nicknames have evolved over time--they don't all make perfect sense. There are also often many nicknames that can be derived from a given name. You may have to look them up on an individual basis to see how they relate.