The book opens by presenting its author as the Preacher, the son of David, king in Jerusalem. At once he states his motto: vanity of vanities, all is vanity. The Hebrew word hebel means breath or vapor, something you can see but cannot hold. He then asks what profit a person gets from all the toil done under the sun.
To answer, the Preacher watches the world. One generation goes and another comes, but the earth remains. The sun rises and sets and hurries back to its place, the wind circles and returns to its course, and the rivers run to the sea without ever filling it. All things are wearisome, and nothing is new under the sun, because there is no memory of former things and there will be none of what is yet to come.
Then he speaks in the first person. As king over Israel in Jerusalem, he set his heart to seek and explore by wisdom everything done under heaven, and he calls it a heavy task that God has given to the sons of men. He saw that it is all vanity and a chasing after wind; what is crooked cannot be made straight. Though he grew in wisdom beyond all who ruled before him, he found that knowing wisdom and folly is also a chasing after wind, for in much wisdom is much sorrow.