Students of psychology, philosophy and other disciplines which touch upon the operations of the mind and the question of free will have probably heard mention of the experiments of Benjamin Libet, a University of California at San Francisco neurobiologist who conducted some remarkable research into the brain and human consciousness in the last decades of the 20th century.
One of Libet's most famous discoveries was that the brain "decides" on a particular choice milliseconds before we ourselves are conscious of deciding. The brain creates an electrochemical "Readiness Potential" (RP) that precedes by milliseconds the conscious decision to do something. This has been seized upon by materialists who use it as proof that our decisions are not really chosen by us but are rather the unconscious product of our brain's neurochemistry. The decision is made before we're even aware of what's going on, they claim, and this fact undermines the notion that we have free will as this video explains:
Michael Egnor, writing at ENV, points out, however, that so far from supporting determinism, Libet himself believed in free will, his research supported that belief, and, what's more, his research also reinforced, in Libet's own words, classical religious views of sin.
Libet discovered that the decision to do X is indeed pre-conscious, but he also found that the decision to do X can be consciously vetoed by us and that no RP precedes that veto. In other words, the decision of the brain to act in a particular way is determined by unconscious factors, but we retain the ability to consciously choose not to follow through with that decision. Our freedom lies in our ability to refuse any or all of the choices our brain presents to us.
Egnor's article is a fascinating piece if you're interested in the question of free will and Libet's contribution to our understanding of it.