To yearn for something is to really, really want it. You might yearn for freedom or you might yearn for a perfect tamale. Usually you yearn for something or someone you can't easily get.
If you have a hankering for pie, you could also say that you yearn for it. Yearn also means "to feel sweet on someone" or "to have affection for something." If your girlfriend moves to Alaska and you’re stuck in Texas, you’d probably yearn for her. And when she comes back to visit, you would still yearn — meaning you’d still feel affection for her.