for example, coveting or desiring more than what you are given (in an unhealthy fashion) is pretty wrong. If you desire something more than what you have, lets say you find someone very attractive, more emotionally attractive than your partner... coveting him/her you could lead yourself into another sin (adultery). Does that makes sense?
In Islam we believe that there are 2 types of envy.
The first is negative envy where we covet the material stuff that others have. This kind of envy can't really lead us anywhere positive. Even if it leads us to work harder to get these things it won't make us happy because once we have them w'll just envy other things so we can work ourselves to the bone and gain nothing but a world full of objects that don't give us joy.
The second form of envy is positive envy where we envy other people's spiritual wealth and knowledge and strive to emulate them. So if we see someone who is pious or kind and tranquil and we try to be like them then we can become better people through our jealousy.