In order to act professionally, a person must act in a way that is appropriate to the job that they hold. What is professional for one job will not be professional for another.
For example, professionalism for a customer service representative would involve being very polite to customers. A representative who acts professionally will not get angry at customers. The representative will also speak formally to customers rather than treating them in a familiar way. A doctor who is acting professionally will show appropriate concern for the patient's problems. At the same time, a doctor acting professionally will not become overly involved with a patient and will not, for example, flirt with an attractive patient.
Professionalism is all about acting in ways that are appropriate to the job at hand and in accord with the code of ethics established for that profession or career.