Tennyson's poem "Ulysses" depicts the poet's vision of what Ulysses (also known as Odysseus) is like in his later years, after he settles down to rule his kingdom.
Ulysses is bored with ruling; his subjects don't know the real person behind his facade, and they do not appreciate him. Worse, he knows he is aging and fears he hasn't much time left before "Death closes all." Ever the adventurer, Ulysses cannot merely sit around ruling a kingdom. He yearns to return to the sea and have one last adventure before he dies. This poem is his plea to his former mariners to set out on that last journey with him.
Before he addresses his main argument to the mariners, Ulysses recounts some of their adventures. He attempts to explain to his friends the source of his boredom. "For always roaming with a hungry heart/ Much have I seen and known." Since he always had a drive, a thirst for adventure, Ulysses has encountered many cultures, people and sights. The hunger is an apt metaphor to describe his great yearning for adventure over the years; it continues now and, one might argue, is even stronger since he sees the last stages of his life approaching. All Ulysses wants to do is have one final adventure instead of feeling useless.
After reminding his friends of their great adventures, he entices them by suggesting that, although they are not as strong as they used to be, they are certainly not useless and should not just be sitting around idly. We are "one equal temper of heroic hearts,/ Made weak by time and fate, but strong in will/ To strive to seek, to find, and not to yield."
Lord Tennyson's poem "Ulysses" is written from the perspective of the hero whose name appears in the title of the poem. Ulysses is his Roman name; the Greeks called him Odysseus and the most extensive account of his adventures appears in Homer's Odyssey, which was written around 725 BCE.
Whereas Homer's Odyssey focuses on how Odysseus managed to make it back home to Ithaca after ten years of fighting at Troy, Tennyson's poem shows the hero looking back after his adventures and after his return to Ithaca.
The phrase "hungry heart" appears in the context of the larger phrase at lines 12-13 of the poem: "For always roaming with a hungry heart / Much have I seen and known". The reference here is to Odysseus/Ulysses and his various wanderings around the Mediterranean region after the fall of Troy.
I would say that the phrase "hungry heart" refers to Odysseus' insatiable curiosity about the different peoples that he encountered. He had himself lashed to the mast of his ship and he stuffed his crew's ears with wax so that he could listen to the song of the deadly Sirens. He ended up getting several of his men killed in his curiosity about the Cyclops in Odyssey 9. Odysseus' heart was, indeed, hungry, hungry for adventure and hungry for the glory that encounters with strange and unusual creatures and peoples might bring to him.