Emulation is a Desire for a thing which is generated in us because we imagine that others have the same Desire.

Exp.: If someone flees because he sees others flee, or is timid because he sees others timid, or, because he sees that someone else has burned his hand, withdraws his own hand and moves his body as if his hand were burned, we shall say that he imitates the other’s affect, but not that he emulates it—not because we know that emulation has one cause and imitation another, but because it has come about by usage that we call emulous only him who imitates what we judge to be honorable, useful, or pleasant.

As for the cause of Emulation, see P27 and P27 S. And on why envy is generally joined to this effect, see P32 and P32 S.