In our study of James chapter four, we are reminded that we are not God and so we should not act like we are. We look at the cause of all the struggles in the world and the answer to them which is only found in resting in the will of God.
"What causes fights and quarrels among you? Don't they come from your desires that battle within you?" NIV translation
James gets right down to the point that the problem is with our own hearts and our flesh. Paul told us of the same struggle, in Romans 7:7 - 25, between godliness and the flesh.
"You want something but don't get it. You kill and covet, but you cannot have what you want. You quarrel and fight. You do not have, because you do not ask God." NIV translation
The root of the problem is that we seek the things of the world and don't look to God and trust Him to provide.
The picture here is of a little child that wants something and throws a tantrum in hopes of getting it instead of pointing or asking the parent for it.
"When you ask, you do not receive, because you ask with wrong motives, that you may spend what you get on your own pleasures." NIV translation
James tells us the third part of the problem and that is our motives. Instead of having our will replaced with God's will, we seek to follow our own will. We don't ask for the things of God but instead focus on the things of the world and satisfying the flesh. God simply does not give us whatever we want because He knows what is best.
"You adulterous people, don't you know that friendship with the world is hatred toward God? Anyone who chooses to be a friend of the world becomes an enemy of God. Or do you think Scripture says without reason that the spirit he caused to live in us envies intensely?" NIV translation
God is a jealous god! He always has been and always will be as it says in the Ten Commandments (Exodus 20:5). James is reminding us that God will not be happy with second place in our lives. We can either pursue the things of God or the things of the world but not both. He uses some very strong words (hatred, enemy) to get the point across. We all have to continually ask ourselves who our friends are and remember Proverbs 18:24.