If you are a fool, keep quiet. People may think you are a fool, but they may not be sure. There remains a little doubt perhaps.
If you are a fool, and open your mouth and say something stupid..... oh dear! People will now know you are a fool for certain.
It's a nice little saying. It has some wisdom in it! I think it is also a general reminder to think before you speak! Better to be quiet and think about something (even if people assume you a being a bit slow/stupid) than to shout out the first thing that comes into your head (which is probably not a very good idea).