Confirmation bias is the tendency to accept evidence confirming what one already feels justified in believing while ignoring, downplaying, or even rejecting evidence that might tend to contradict one's beliefs. Confirmation bias is a form of cognitive bias.
Confirmation bias sabotages objectivity by discarding or ignoring data which challenges the prevailing consensus. The best scientists consciously strive to overcome this psychological tendency, while advertisers, partisans and many journalists try exploit it. This is because almost everyone is subject to confirmation bias to at least some degree, and it is one of the most difficult logical fallacies to overcome. For example, when watching a favorite sports team, it is very difficult to spot infractions made by your own team, and very easy to spot those made by the other - while someone cheering for the other team will notice the reverse. The objective mindset is that certain infractions will be penalized regardless of which team you want to win.
Ronald Bailey wrote:
- Once a particular notion becomes conventional wisdom, evidence and stories confirming that conventional wisdom are easily accepted and published—and reported in the media. Those that contradict the prevailing views have a much harder time getting a hearing. 
Of course, just because a view is popular does not mean that it is due to confirmation bias. All ideas must be evaluated on their own merits; it is possible to succumb to confirmation bias in favor of something that is true, in which case you would end up believing correctly but for illogical reasons.
Confirmation bias can also be "transferred" between ideas when the same person is presenting them. That is, if someone you trust tells you something you have confirmation bias towards, then tells you other things that you haven't heard before, you might believe everything because otherwise you would have to recognize the person as fallible and possibly reconsider the other things that person has told you in the past. (This is related to the appeal to authority.) To be objective, all ideas must be evaluated separately, and without considering who is actually presenting them.
The opposite of bias and prejudice is objectivity and even skepticism. Scientists who are open minded avidly seek out data which might potentially contradict their theories - or at least the theories of their colleagues. Ideally, if collected data contradict a prediction made by any theory, then the theory must be reevaluated or even discarded. This is part of the purpose of scientific peer review; the idea is to make sure that a particular experiment can convince scientists who might not believe a particular hypothesis (and are therefore not subject to confirmation bias).
If confirmation bias is not corrected for, this often leads to the situation in which an entire generation of scientists must grow old and die before the next generation comes up which is willing to examine newly discovered ideas; see Paradigm shift. It is unfortunate that advocates of global warming and evolution fall prey to confirmation bias, or even willfully allow it to cloud their judgment. Another example of a common confirmation bias is the "selection bias," such as if you only decide (select) that you will watch news that supports your own beliefs, which will almost always cause your beliefs to get stronger regardless of whether they are right. This is often unconscious, because those news channels are the ones that you probably enjoy the most.