Can personality change or is it something fairly stable?

The term 'personality' is somewhat vague since it means somewhat different things to different people; further, the same person may use the term differently according to context.  Unfortunately, even social scientists who study this aspect of human beings don't use the term very precisely.  For precision, they use other measures and then fold them all into the broader construct of 'personality'.   

First, 'behaviour' is the only thing that can be directly observed.  By observing an individual's behaviour, we draw inferences regarding them and their personalities.  Underlying behaviour are three layers of constructs:

Mood: This can vary several times even during single day based on forces internal to our outside of the individual.  (Of course, if the shifts occur uncontrollably and suddenly, then one probably has a mood disorder.)  Mood changes are natural, normal, and expected.  Indeed, it is changing moods that make us feel human to others.  If one eat the same food, however delicious it might be, three times a day, everyday, one begins, eventually, to hate it.  In the same manner, it might be hard to be with a person whose mood never shifts or changes even slightlhy; such an individual begins to feel like a robot.

Attitudes, Values, Beliefs: These are generally stable but could change (more than once) over the course of a lifetime.  Typically they will last many years -- or even one's entire life -- until and unless one has new experiences and learns new things that contradict existing attitudes, values and beliefs.

Personality:  This is even more stable than attitudes, values and beliefs.  It usually doesn't change at all. A deeply traumatic or fundamental transformational experience could cause a permanent personality change.  An individual who experiencce dramatic, uncontrollable shifts in personality over short periods of time (say a day, or week) is probably suffering from a personality disorder.  Personality and mood disorders are different things altogether and should never be confused.  

Personality is the overall sense of a person one obtains by interacting with them over a period of time.  It is possible for people to mask their personalities by behaving differently at different times, but this does not change their underlying personality.  Actors do this sort of thing for a living.  Recall that behaviour is the only thing that we can observe and we make inferences regarding personality (i.e., what's happening under the hood) from behaviour.  

If you happen to meet an individual just once, and you caught that person in a specific mood, say, happy, sad, or angry – or as the American say, glad, sad, or mad – you may mistake the mood for the person’s overall personality.  It is only through interacting many times in a variety of context does a true picture of personality emerge.  Again, if you heard an individual express certain attitudes, values or beliefs, you may gain some insight into that person, but only if you have learned the entire range of attitudes and beliefs in different contexts would you really begin to understand the real person.

Behaviour:  An individual's behaviour at any moment is influenced by a variety of factors – mood;  attitudes, values and beliefs; talents and abilities (these are ‘internal’ factors – or by external factors such as the presence of other persons, situational factors, etc.  Behaviour, in turn, can influence talents and abilities – e.g., through repeated practice, one can improve skills in a particular area.  Again, talents and abilities can influence attitudes, values and beliefs (regarding oneself, and others).  Both of these can influence mood.  One’s behaviour can also influence the environment.  Hence, there is a complex interplay among all these various factors.  Usually, behaviour is shaped by shaping attitudes, values and beliefs.  But behaviour too, can be used to influence attitudes, values and beliefs.  This sort of thing is used in military, for instance, where individuals from a variety of backgrounds are put through a common training program and by making them engage in certain kinds of behaviours, their attitudes, values and beliefs are changed. 

Example:  Let’s suppose that because of one’s values and beliefs, one never indulges in smoking or drinking.  A situation occurs one day when one ends up smoking and/or drinking.  This creates a conflict in the individual’s mind.  One may resolve the conflict by engaging in deep self-criticism and promising never to repeat the act.  Or one might resolve the conflict by changing one's attitudes and beliefs regarding smoking and drinking.  The latter is an instance of behaviour changing values and beliefs.  

Note that a change in values and beliefs may not necessarily result in a change in personality: an individual who is kind-hearted, compassionate, punctual, and so on, might remain so even after a change in some values and beliefs. 

There is a field called Neuro-linguistic Programming (NLP) where behaviour is used to shape personality, attitudes, etc.