Macbeth utters these lines after being told of his wife's death. To truly understand them, you must look at them in context. The full thought of which this lines is a part is:
Life's but a walking shadow, a poor player
That struts and frets his hour upon the stage
And then is heard no more. It is a tale
Told by an idiot, full of sound and fury,
Earlier in this soliloquy, Macbeth has also said:
Tomorrow, and tomorrow, and tomorrow,
Creeps in this trivial pace from day to day,
To the last syllable of recorded time.
And all our yesterdays have lighted
The way to dusty death for fools. Out, out, brief candle!
In other words, life is meaningless. It is lasts for a brief time and is full of "sound and fury", but in the end, nothing lasts. Life, a "walking shadow", something inconsequential, really doesn't amount to anything. Macbeth is realizing that all his machinations to become king and to keep the throne have come to nothing. He "made a lot of noise" and created quite a story, fought quite a battle, but in the end, nothing is to come of it.