How can I stop being treated like a doormat and enforce boundaries?

I am kind of person who most people treat like a doormat. My friends say mean things to me and make fun of me, and it’s difficult for me to get out of this situation cz they are everywhere. I am partially at fault for letting them do this to me but at the same time I don’t know how to enforce respect as a necessary condition in my old friendships.
How can I stop being treated like a doormat and enforce boundaries?
Post Opinion