How do scientist deals with ethics in their jobs?

There are various ways that scientists deal with ethics in their jobs. For example, they might have to go before an ethics board to get approval for a study. They also attempt to ensure that what they do is legal and that it does not violate their own personal moral codes.