They cancel plans when something better comes up.
As a general rule, when you make plans with someone, you expect them to follow through with their commitment. A real friend will do exactly that. If they said they would attend your party or meet you for dinner, they will be there. They will not suddenly cancel on you without a very good reason.
Everyone occasionally has times where something unavoidable crops up. A relative may suddenly be hospitalized or another good friend has car trouble and needs someone to come pick them up. Emergencies happen, and the average person has no problem taking a rain check on dinner because their friend’s child caught the flu. Problems arise, however, when you have a friend that cancels their plans with you, not because of extenuating circumstances, but because something better came up. For example, you and your friend had plans for a lunch date. The night before, or even the morning of the day you were supposed to meet, your friend received an invitation to go to the amusement park with another friend of theirs. Rollercoasters sounded more fun than lunch, so they ditch you to hang out with someone else. When this happens repeatedly, you need to stop thinking of the other person as a friend. To them, you are not a friend. You are a backup plan.