Whether or not the concept of free will, (sometimes referred to as libertarianism or self-determinism), is compatible with the law of cause and effect, (determinism), depends on whether or not one believes that there is a cause for absolutely every effect, (known as hard determinism) and whether or not freedom entails absolute freedom rather than simply the freedom from something. Believing in hard-determinism defies the freedom of free will, because it entails that the will itself is caused by factors which are predetermined by an endless precedence of factors. This setup enchains the will to the complex mechanics of the universe. Absolute freedom entails the absence of force or restriction, but I will explain why such a set up simply isn't possible.
Envision a sphere. A sphere has the power to roll in absolutely any direction. It is under no restriction. Take away gravity and the sphere appears to have more freedom. However, the sphere won't move. It won't go up or down ror side to side. It will just sit there. Nothing is preventing the sphere from moving in any direction, yet because there are no forces to move the sphere it will continue to stay where it is. So even though the sphere is free to move in any direction, it is not free to move. Therefore, the absence of force can be a restriction, because nothing can occur without it. Alternatively, if the sphere is forced to move then the sphere is then free to move. However, once the sphere is forced to move it is no longer free not to move.
Compatabilists, (believing in determinism and free will), don't see free will as being entirely free, but rather free from certain things. They're able to incorporate free will into the causal chain because of how they define it. They may define an instance of free will as simply having the freedom to act. However, they do acknowledge that one cannot control what their actions are. So one can do as he wills, but cannot will what he wills. If one wishes to define free will this way then it is indeed compatable with determinism, but metaphysical libertarians define free will very differently.
Libertarians often see free will as a power granted to them by a god, a universal power or simply nature itself that isn't influenced by the source that enabled their power. In other words, even though YHWH may have given Christian's their free will, he is not held responsible for determining what exactly their will is. So even though their free will was caused by something, the initial cause does not ultimately predetermine all their future decisions.
The difficulty with this concept is that it strips the human will of any mechanics or properties. In other words, there are no internal causes for the will. It's like a turbine that spins without any power or a car that runs without an engine or gas. Bottom line is, it's completely unrelatable to anything that exists in this world. Which would explain why libertarians consider it such a sacred and divine notion.
So without any mechanisms to determine exactly how free will functions, the conclusion is really that there is simply no reason for why people have different or similar behaviour. Some libertarians will acknowledge the influence of genetics, experiences and enviromental restrictions, but will not accept complete predetermination by these factors. This means that they might acknowledge someone's predisposition to do drugs, inclination to easily get angry or difficulty with learning, but will still ultimately maintain the position that the person's undetermined free will can trump such influences merely by choosing to do so.
The problem I have with this notion is that it begs the question, 'why do people choose to suffer, be despised and miserable?' A libertarian may acknowledge that yes, he grew up with an alcoholic abusive father, had a learning disorder that made school very difficult and had friends constantly pressuring him to do drugs. However, despite these forces working against the guy if he ends up becoming a miserable alcoholic, drug abuser and street dweller earning money from engaging in criminal activity then the conclusion is that he could have chose a different path.
A libertarian argues that well, there was a different guy who had the exact same forces working against him, but he became a happy, respected entrepreneur. But then there's no specific explanation for the difference in outcomes. The argument is left at one made bad choices and the other made good choices. When one asks 'why?' the argument usually becomes circular. "Why'd you make the right choice? Because that is who I am. Why are you who you are? Because I chose to be who I am. Why did you choose to be who you are? Because that's how God, (the universe, nature) wants me to be. Why do you want to be the way God wants you to be? Because I am a good person. Why are you a good person? Because I'll be rewarded and it's the right thing to do. Why do you want to be rewarded and do the right thing? Because that is who I am." The argument could go on for some time before becoming circular, but in the end there is simply no reason for people's decisions when it comes to the premise of free will. And quite frankly, I find that incomprehensible.
I don't care for adopting the compabalist's definition of free will, but in a way I have come to similar conclusion on the matter, because I've come to believe that despite predetermination people still have choices. When one comes across a tough decision the common sentiment is often described as being torn or conflicted. This is because I believe, (and neuroscience is finding more and more evidence to support this), that a part of the mind wants one thing whilst another part wants another. I don’t know the complex mechanics behind this state of feeling ‘torn’, but I can relate it to a battle. One force fighting another. The victor of the battle is equivalent to a decided upon choice. So, from that perspective choice is basically an intellectual and emotional conflict of the unconscious mind. From that point of view people can make choices, but they can't control, nor really comprehend the chain of factors that lead up to that choice.
In conclusion, I believe that people simply can't be different for no reason because it just doesn't make sense. The same as power cannot exist without a source, the floating sphere cannot move without something forcing it to move. Although human beings are far, far more complex than a sphere they are similarily powerless without something that forces them. In order to have power one must be empowered. A person cannot control anything if there isn't anything controlling the person. However, if there does exist a power without a source, that with which we call free will, then it begs the question; Why are people different and why do they have different behaviour? How can someone be good or bad, poor or rich, motivated or lazy if there is nothing that causes them to be that way? I'll concede that the concept of freewill truly is outside of my realm of comprehension.