There are two well-known pieces of music in the Lord of the Rings soundtrack that use the flute.
Concerning Hobbits, track 2 of The Lord of the Rings 1 soundtrack, using a tin flute. The scene shows Bilbo introducing the Shire and the Hobbits while writing his memoirs.
The Return Of The King, track 17 of The Lord of the Rings 3 original soundtrack, uses the flute, and the performer is the famous flute master Sir James Galway. The scene shows Frodo and Sam reminiscing about the beautiful scenery of the Shire while climbing Mount Doom.
If the track the questioner asked about is not these two, please add what the scene was at that time and which part it came from.