Though envy and jealousy often get used interchangeably, they are very different emotions indeed. There are some – myself included – who will insist that jealousy is a "secondary" emotion, meaning that the jealousy is caused by and hides another emotion behind it.
When people look confused at that explanation, I think of my old co-worker Bob .
Bob had been married for about ten years; he and his wife Sharon were about as normative as they come. She had gone part-time at her own job to raise their kids, and stayed part-time even after they were teenagers. Like most couples, Bob and Sharon had many common interests, but also some interests the other didn’t share – NASCAR and quilting (respectively) being the biggest difference.
There were more than a few days that Bob would look out the window at the beautiful day outside, and know he had over four hours left in his shift. Sharon, working only half-days, would sometimes bring him lunch before spending the afternoon at a park. Bob would tell me how he wished he wasn’t working that afternoon too, since it was such a nice day and he wanted to spend it with Sharon.
That’s envy. Bob wanted an experience he wasn’t able to have – spending the afternoon off work and with his wife.
Sharon had made new friend on social media who was also into quilting and worked part-time. His name was Wilbur. There was a local quilt exhibition that Sharon went to with Wilbur while Bob was at work.
For those of you oversteeped in rom-coms and Lifetime movies, no, Wilbur was not interested in Sharon romantically, not in the slightest.  Bob knew this, and yet Bob, who actively disliked quilting stuff, was upset about Wilbur going with Sharon to the quilt exhibition.
That’s jealousy. The net effect on Bob was zero. If anything, Wilbur did Bob a favor. Sharon got to do an activity she enjoyed, and Bob got to avoid an activity he disliked. It had no negative effect on Bob’s life – if anything, it was a net positive for him. And yet, he felt upset.
Luckily, Bob is a guy with a pretty high emotional IQ. He realized that if he just did the "typical" thing and insist that Sharon go with him to the exhibition instead of Wilbur, it would lead to resentment all around . It took a good bit of self-inspection, but Bob was able to figure out that his real worry was that Sharon would see him as "less", or as less of a partner, because she was doing activities without him. Once he figured that out, he and Sharon were able to talk it out and made their relationship stronger.
We do a horrible job putting names to emotions in our society.
Taking the time to tell the difference between envy and jealousy is totally worth it.
 See my artistic license, please.
 You don’t need to know why. More to the point, shame on you if you assumed that it was a sexual thing just because Sharon and Wilbur were different genders.
 Resentment from Bob because he would then have to do something he disliked, resentment from Sharon because she would have to wait on Bob and then put up with him being grumpy at a favorite activity of hers.