Haha, I'm the same as Jintor, im mostly silent in public. Even the mini bosses wife at work asked him if I ever actually talk, she has visited a few times.
For the most part it's about not thinking what you have to say or share is relevant to these specific people. Everyone has different interests and most people have no issue spouting out bullshit even if the other person has zero interest in it. Others, like myself, assume to know what the other person is interested in so we only pick specific topics to join in with. I'm not going to talk about say, starcraft 2 esport shit to my boss because it's not relevant to his interests. It logically makes no sense to do so.
The problem it seems to come down to is fear. You end up scared thinking that the things you are interested in, the things you know, will just bore the other person. What am I meant to talk to a cute girl on the train about? Starcraft? The tv I'm watching? The music I listen to? That I'm a gamer and pc enthusiast? Neither of these are all that interesting and straight off the bat they paint you as a specific individual. One who probably doesn't enjoy going out or social interaction all that much and is just a little too nerdy. Not starwars or star trek nerdy but who knows, maybe that's in your closet!
In a world when everyone who is thrown into the public light is seen as a specfic character, someone who has that typical good looks, charm and general outgoing feeling, it's hard to persuade an individual that you are just as awesome as they are even though you are different.
So you begin to analyze everything you say and question it's importance. Which sentence makes sense in this conversation, how will they respond, can I continue the flow of conversation after they have answered. Those are the 3 big issues that go on in your head as you sit there and listen.
It's frustrating to not have anything to contribute to whatever is going on because you don't know the topic of discussion. You can fake it as don has suggested but it is frightenly hard. In reality people are judging you but not for what you think. A lack of understanding of xyz isn't going to get you in trouble, just show an interest in getting to know more about it. That will win you brownie points, even though you are probably faking it, just like other person is.
For me it mostly has to do with fear. I have no relationship with my folks because I'm afraid of what they will say. My parents are pretty darn awesome, so I should have nothing to fear and yet I do. Its just one of those odd things that exists within my head. I'm sure it started once high school began. I was the class clown in primary, the funny silly one who would never shut up in class. I was the sprinter who could keep up and beat kids 1 or 2 years older. I totally still have the school record after 18 years, I got told I had it in year 10, so I'm just going to pretend I still do!! Once I hit high school that all changed. I could still be funny but it was just rare, I ultimately shut down. The sad thing is I don't believe I have evolved from this state, I'm still that kid who just started high school.
So my 13 year old brain has no answer or solution for you. If it ever grows up and finds one I will certainly let you know.
As a side idea, not a solution. You could always keep a journal of specific interactions that happen during the day. The more you write down and look at it the more your bound to see the flaws in what you were thinking at those specific times. Train your brain to notice what's going on and how to join in. Something like that.