To me, what Shakespeare is saying in this very famous line is that we all are not that important and we are not permanent features of the world. This makes sense given what the poem is about. The poem is talking about how people go through various stages of life and eventually become nothing.
By saying that we are all just actors, Shakespeare is emphasizing that we ourselves change over time, playing first one role and then another.
So the major idea here is that, even though we think we are important and permanent, we are not.
You're right, @pitter, that is definitely what the poem is about. I was hinting at the fact that there may be some alternate meanings to it. Something like....This physical world is a schoolhouse, life is merely a play to teach us... and each person can be both a student and teacher at any given time.