If you're talking about the longings of the heart, use the word desire. When you are studying for a difficult history exam, the desire to be somewhere far away doing something fun might be very strong!
Desire can be used as both a noun and a verb. Is your boyfriend your heart's desire? Your parents probably desire your punctual appearance at the dinner table every evening. Desire is usually used not just when you long for any old thing, but for something that is associated with giving great pleasure. Thus, you might want to get an A on a test, but you desire a piece of chocolate cake.