"What does man gain from all his labor at which he toils under the sun?" NIV translation
The man that built the Temple of God in Jerusalem is asking this question! Solomon is saying that all the efforts we put into material things here on earth are meaningless. All of our work on material things, even building the Temple, are only temporary.
"Generations come and generations go, but the earth remains forever. The sun rises and the sun sets, and hurries back to where it rises. The wind blows to the south and turns to the north; round and round it goes, ever returning on its course. All streams flow into the sea, yet the sea is never full. To the place the streams come from, there they return." NIV translation
He points out the fact that we are all going to die but God's creation continues without our efforts. This wisest of men is showing us his understanding of nature. We must remember that this was before all of our scientific knowledge but Solomon was able to understand and explain these events.
We do not have the power to make things continue but we see, through these natural events, the sustaining hand of God.
"All things are wearisome, more than one can say. The eye never has enough of seeing, nor the ear its fill of hearing." NIV translation
Our flesh is never satisfied. We always want more and more as we get easily tired of the old things and seek the new. It seems that Solomon is speaking of the days we live in now as most are chasing after the latest version of everything and the newest gadget.
"What has been will be again, what has been done will be done again; there is nothing new under the sun. Is there anything of which one can say, 'Look! This is something new'? It was here already, long ago; it was here before our time." NIV translation
These verses may be tough for us to understand in our world today as we see all the latest gadgets designed to make our lives easier. But, we have to stop and reflect on one of the names of God which is El Elyon and it means "God Most High". We must realize that He is the one who created all things and, no matter what we do, God designed it even before the earth began. He is the One who is supreme and, without Him, not even the latest iPhone would exist.