Each is distinct from the other, yet this distinction is a real, not merely logical, one. The following explanation summarizes the main argument of On Being and Essence , Chapter 4, which can be found by following this link. It is the quiddity of the thing, that which is known about it by our forming of a concept. It is a formal principle since for material reality, it is abstracted by the human intellect. That a thing is or has existence, is a principle really distinct from its quiddity.
Existence then is that which makes essences to be, to exercise the act of existing.
Just as the substantial form of a material being determines and makes actual some part of matter, so esse actualizes the potency of a thing's essence. Esse is logically prior to all other actuality because a thing cannot be in a certain way unless it simply is.