I know that an operation that I need to perform is contrary to the safety rules, but my supervisor has told me that the machine needs to be started. Do I need to ignore the safety rules or get in trouble with my supervisor?

Respecting safety rules is a fundamental part of our work. Compliance must be an integral part of our working procedures and methods.  
If you know the operation that you are asked to perform is contrary to safety rules, you should discuss the matter with your supervisor or his/her supervisor.  If your supervisor asks you to disregard the safety rules, you are entitled to refuse to perform the requested operation. In this case, you should report the matter to your Departmental Safety Officer.