Ethics in research are very important to ensure that conclusions are as objective and unbiased as possible. The worst thing a researcher can do is make up data to support a thesis; invented data is referred to as "cooked" and is entirely invalid. On the other hand, data taken out of context or deliberately misunderstood (reassigned in meaning, applied to the wrong data set, mentioned but not admitted into debate) is almost as bad, since it is either failure to understand the subject or deliberate refusal to accept an alternate conclusion. In either case, the researcher is guilty of ethical fraud.
One of the biggest defenses against non-ethical research is the Peer Review process. Papers submitted to legitimate journals are reviewed by experts in the field, and the research, sources, and conclusions are examined for authenticity and honesty. If the sources, for example, are found to be incorrect or out of step with accepted practices, the paper might not be approved. If the writer of the paper has invented data or plagiarised content, the peer review board should be able to catch it based on their experience in the field.
In order to prevent accidental ethical mistakes, a researcher should be careful to keep their research as close to objective as possible. This is not always easy, since research is generally done for a specific thesis; in order to prove or disprove a thesis, one will naturally look for data in the area, and might be inclined to ignore data that does not support the intended conclusion. Seeking data that runs counter to your thesis is a good way of ensuring fair examination, if not objective results.
Many research groups have their results and methodology made public for transparency; if the group has ignored or fabricated data, an interested outside party will be able to bring that ethical violation to light. Always be wary of research that refuses to disclose source, method, and knowledge of other data.