A Cognitive Bias is an involuntary pattern of thinking that produces distorted perceptions of people, surroundings, and situations around us. You can also consider it an altered way of thinking that affects our perceptions and decisions, and can cause mistakes in reasoning, logic, and evaluation. There are differing varieties of bias: some can cause recollection of past memories to be incorrect while other social biases can cause judgments of other people to be skewed.
An example of a cognitive bias is attentional bias in which more attention is placed on things to extreme interest to a person. This can be seen in drug addicts who have greatly increased attention to drug related stimuli in comparison to other things, such as reacting more quickly to a photograph of a drug related object than a photograph of an animal. Another cognitive bias is the Fundamental Attribution Error which is when a person uses personal and internal attributes to explain someone else's behavior ("That person got a bad grade because they are lazy") while using external and situational factors to explain their own behaviors and consequences ("I got a bad grade because the professor doesn't like me").
Some research suggests that cognitive biases are mental processing "shortcuts" that allow us to make decisions faster when time is a more important issue than accuracy of judgment. These types of cognitive biases are used more frequently when we have limited mental processing capabilities due to lack of time or lack of knowledge about a subject or situation. This is purported to be evolutionary in nature so that we can identify possible dangerous situations quickly. An example of this would be noticing someone running towards you quickly as you were walking down the street at night. Instinctively you are cautious and wary of this person and quickly head in the opposite direction. If you had taken time to observe and think about the situation you would have realized that this was a person going for a jog but you were alarmed due to a cognitive bias to identify a possible dangerous scenario.