Jealousy example : Feeling the threat and/or fear of having something taken away from you. You feel competition, or see someone as a rival to be overtaken.
Envy example: Wishing you were getting what someone else is getting or has. There can be competition, but it`s design is for a 'equal' playing field. You see something someone else has, and you desire, and want it too.