If you are in some kind of unhealthy relationship, whatever form that takes, the only thing that you can do, other than leave, is to take responsibility for your part in it and work on yourself.
I’m not saying it is your fault if someone is mistreating you, but to a certain extent you have perhaps unwittingly allowed it. This is good news because it means you have the power to change it. Here is a personal example to demonstrate what I mean.
When I was 8-9, I was at a nice private prep school in the South of England, where I was punched and kicked daily. Because I had been taught to “turn the other cheek,” I consciously resisted reacting and so it continued to happen. It was only when one of my attackers took me by surprise from behind one morning, that my involuntary reaction took over and I punched him in the face. He ran off crying like a toddler and from then on I was never hit again. So in a sense, through my lack of reaction, I had been allowing them to bully me.
In a similar way, if you are being mistreated either at home or at work, the only person who can do anything about it is you. It’s no good complaining, “my boss/partner/mother never listens to me.” You need to learn to communicate assertively so that you can express your opinions and feelings openly. If you show that you believe in yourself, people will start to listen to you.
If you are being spoken down to by someone as if you are stupid and inferior, it more than likely has much more to do with an insecurity issue they have than anything to do with you. I remember many years ago that I left a job where my boss had been treating me like dirt for a few months. The day I was to leave she explained that she had been extremely upset because her boyfriend was being unfaithful. It may not be as dramatic as that, but there is usually some other explanation for someone’s behaviour towards you if it seems excessive. If this person is your boss as in my case, you may choose to be patient until you find another job where you are treated with respect. In the meantime, you can certainly work on respecting others, and on respecting yourself, and you should start to notice a difference in how you are being treated.
No matter how much you work on your confidence and assertiveness, you can never change another person’s personality, but you may be able to limit the time you spend with them, or limit the conversation to the level that you feel comfortable with. Instead, surround yourself with people who do appreciate you and treat you well. Bear in mind that most people are well meaning and not against you. Also try to remember that people are going through different experiences, some of which may cause them suffering.
Ultimately if someone is treating you badly it is because they feel bad about themselves. It is not your job to rescue them or change them, but you can consciously be kind and loving to them, while at the same time taking care to be kind and loving to yourself.