There are three types of craving: craving for sensual pleasures, craving to become something (that makes someone have ambition) and the craving to not become something (that makes one suicidal or withdrawn). From Itivuttaka 58:
This was said by the Blessed One, said by the Arahant, so I have
heard: "There are these three cravings. Which three? Craving for
sensuality, craving for becoming, craving for non-becoming. These are
the three cravings."
If you crave for food, and eat some tasty food, you may cling to it or become attached to it. You think and fantasize about it even when it's not there. That's clinging or attachment. Craving gives rise to clinging and clinging gives rise to greed or lust to acquire it.
If someone prevents you from getting the tasty food that you cling to, then you feel angry. That hatred or aversion arises because you were denied what you cling to.
If this anger makes you enraged that you go and harm this person who prevents you from getting what you want, this is delusion. Delusion clouds your better judgment.
The craving to become something is similar. Examples are like wanting to get a gold medal or to get a promotion or to become doctor or professor or get recognition etc.
If you crave to get recognition and get it once, you may cling to it and want it even when it's not present. This leads you to do things to get recognition as you have greed (or lust) for it.
If you don't get recognition, but someone else does, you become envious. That's aversion.
If continuously not getting recognition leads you to become depressed, which clouds your normal healthy state of mind, then that's delusion.
According to AN 3.68:
The Blessed One said, "Monks, if you are asked by wanderers of other
sects, 'Friends, there are these three qualities. Which three?
Passion, aversion, & delusion. These are the three qualities. Now what
is the difference, what the distinction, what the distinguishing
factor among these three qualities?' — when thus asked, you should
answer those wanderers of other sects in this way, 'Friends, passion
carries little blame and is slow to fade. Aversion carries great blame
and is quick to fade. Delusion carries great blame and is slow to
fade.
"[Then if they ask,] 'But what, friends, is the reason, what the
cause, why unarisen passion arises, or arisen passion tends to growth
& abundance?' 'The theme of the attractive,' it should be said. 'For
one who attends inappropriately to the theme of the attractive,
unarisen passion arises and arisen passion tends to growth &
abundance...'
"[Then if they ask,] 'But what, friends, is the reason, what the
cause, why unarisen aversion arises, or arisen aversion tends to
growth & abundance?' 'The theme of irritation,' it should be said.
'For one who attends inappropriately to the theme of irritation,
unarisen aversion arises and arisen aversion tends to growth &
abundance...'
"[Then if they ask,] 'But what, friends, is the reason, what the
cause, why unarisen delusion arises, or arisen delusion tends to
growth & abundance?' 'Inappropriate attention,' it should be said.
'For one who attends inappropriately, unarisen delusion arises and
arisen delusion tends to growth & abundance...'
So, basically, you have cravings due to sensual pleasures and cravings to become something. When you give into the attraction towards it, greed or lust arises. When you give into irritation, typically because you are denied it, aversion arises.
When you pay too much attention to something that you shouldn't, like becoming depressed due to lack of recognition or distraught due to loss of a family member, or anxiety due to being worried about what other people think (which started from an aversion), or becoming enraged with others who criticized you, or having vengence due to thinking about what someone did to you a long time ago - these are all examples of delusion.
Firstly, you lust after something, due to craving and clinging. Secondly, being denied something you lust after, or losing it prematurely, would cause aversion. Thirdly, when you pay too much attention to your aversions (and also greed), it causes delusion.