A "fairweather friend" refers to a person who is only a friend during good times or when things are going well. When faced with difficulties or challenges, a fairweather friend may not be reliable or supportive. Essentially, these friends are not dependable in tough situations, as they tend to avoid conflict or hardship.
The term "fairweather friend" originates from the natural imagery of weather; it suggests that just as fair weather is pleasant and easy to endure, so too are these friends. They thrive when conditions are good but are absent or unhelpful when challenges arise. The phrase captures the idea of superficial loyalty.