James points out that the quarrels and fights among us are from the 'pleasures' that we seek yet cannot obtain. Therefore, we do fight and even kill. The world that we are living drives us to seek our own pleasure and they say it is legitimate. However, according to James, it is not, because we cannot be satisfied by seeking pleasure. Our satisfaction only comes when we ask (to God for wisdom).
Those who do not have wisdom become adulterous and seek to be a friend of world, without realizing to be the enemy of God. So we should seek the wisdom in a given situation instead of seeking pleasure.
Wisdom comes from seeing a far, and seeing the result. And we have to know that some day we will stand before the Judge. If we know and believe it, we would live in a different purpose and pace. Our decisions would be changed and our focus will be redirected.
In order to do that, we need to be humble. God gives grace to the humble. We have many examples in OT. Even to the two worst kings, Ahab, the seventh king of Northern Israel, and the king, Manasseh, son of Hezekiah, God gave graces when they humbled themselves. But to the ones who were proud, God brought judgments on them. And our humility shows in submitting ourselves to God, resisting the devil, drawing near to God, cleansing our hands (not literally), purifying our hearts, and mourning. And God is the hope to those who humble, because he will exalt the humble at the end.