Macbeth uses this line in order to express how meaningless and brief life is. He sees it as a walking shadow, a "poor player," or an actor, who walks on the stage, pretending to be someone and feel something for a short period of time, and then exits.