First, you learn new things and you live new experiences. This changes your personality, for better or for worse.
Second, your personality is rooted in your ideals and beliefs, and you can purposefully change those.
Your personality can be described as the way you act and react, and both of those are learned. You may even say programmed. You can change the way you react to some situations, or the way you act in some situations. It takes a bit of practice.
Now that can sound easy, but it requires you to be very open-minded and honest about yourself, because you think with your beliefs already, so changing them may not be that easy. You need to litteraly think differently than you usually do. It’s a lot of introspection.