Long, yearn, hanker, pine, hunger, thirst mean to have a strong and urgent desire for something.
One longs when one wishes for something, and especially something remote or not readily attainable, with one's whole heart or with great earnestness.
One yearns when one regards or desires something with eager, restless, often tender or passionate longing.
One hankers when one is possessed with or made uneasy by a desire because of the urgency of a physical appetite or because of such a passion as greed, lust, ambition, or covetousness or for something beyond one's reach or one's powers even if only for the moment. But often hanker is weakened to the point that it means little if any more than want.
One pines when one languishes or grows weak through longing for something or gives oneself up to fruitless longing for it.
Basically one hungers for food to satisfy an urgent craving for nourishment or for a particular kind of food essential to satisfy appetite, and similarly one thirsts for drink to satisfy an urgent need for liquid or for a particular kind of drink essential to satisfy appetite.
In their extended senses one hungers or thirsts when one longs for something with the full force of one's being.