Sin always starts in the mind. It's not sin to have an evil thought- that's temptation; but it is wrong to dwell on and entertain those thoughts. To make it simpler: A bird can lay an egg on your head, but only you can let him build a nest in your hair!
James 1:13-15 reminds us that if we think about sin long enough, we'll desire to sin. If we want to sin, we will eventually sin. After sin is done, it will leave us dead. That's why it's so important to walk in the Spirit and feed your mind with the Word of God.
Paul sums it up in Galatians 5:24,25: "And those who are Christ's have crucified the flesh with its passions and desires. If we live in the Spirit let us also walk in the Spirit." His Spirit helps you overcome evil desires!