The phrase "stiff upper lip" is an idiom describing restraint in regards to overt displays of emotion. It is especially used in regards to emotions that could potentially be interpreted as a demonstration of weakness, including fear and grief. The actual context for the use of the idiom is usually as a piece of advice, urging people to keep a stiff upper lip when faced with difficulty, and the term is also used descriptively. This idiom is primarily associated with the British, and is in reference to a particular stoic attitude that was culturally cultivated during the times of the British Empire.
In Western culture, demonstrations of emotion are often seen as a sign of weakness, and this is particularly true of any emotion that hints at an underlying vulnerability. In the United Kingdom during the times of the British Empire, people were often expected to maintain a steady disposition, showing very little or no emotion when bad things happened to them. The fortitude associated with this kind of disposition was considered praiseworthy, and the term "stiff upper lip" was often used to reference a strong stoic personality. Generally, the idea of keeping a stiff upper lip still has some cultural significance in the United Kingdom, and the philosophy that cultivated this idea still has some degree of influence, although perhaps not as much as it once did.
The stiff upper lip idiom can apply in many situations. Sometimes it is used to reference the outward display of emotion, and it might be used to describe an attempt to suppress emotions internally as well. For example, if someone is heading into battle, the urging to keep a stiff upper lip is often meant not only to suggest that the soldier keep a brave outward disposition, but also that he should suppress any internal feeling of fear as well.
Sometimes the term "stiff upper lip" is primarily used in the context of advice, such as the soldier example above, but it can also be used descriptively, usually demonstrating admiration for a person’s stoicism. For example, in a conversation about a tough older lady, a man might say, "She had a hard life, but she always kept a stiff upper lip no matter what happened." When used as advice, it is pretty similar to the idiom "keep your chin up" in the way that it’s used, and when used descriptively, it is more similar to the term "hard as nails."