Why you are shy and how to get rid of it are slightly different questions, but let me touch on both.
People are shy for various reasons, but the biggest reason is fear of rejection. We all want people to like us, and if I worry that people might not like my opinions, or my looks, or my company, or the way I dress, or the way I talk, or the jokes I make, that can make a person shy.
There can be other reasons why you are shy. Perhaps you have simply not learned social skills and don’t feel confident interacting with people.
Perhaps something happened to you that has made you shy – for example being bullied or rejected as a child, or a traumatic experience. It is possible, and important, to deal with these things, work through the consequences and long term impact and find healing so you can overcome your shyness.
Perhaps you simply don’t know what to say when you are around people. Some people grow up in very sociable families where conversations are normal and easy. Others grow up in more socially inhibited or even dysfunctional families, and have not learned how to express themselves, deal with emotions, engage people, make friends, talk to the opposite sex, etc. These are all things you can learn.