First, the interesting thing about "being selfish" and "being assertive" is that they actually overlap. If someone tells you that you're being selfish like it's a bad thing, that person is probably trying to manipulate you. They want you to stop being selfish so they can be selfish. This is literally how they try to get their way.
Another way to think about it is that "assertiveness" comes into play when there is a conflict of interest. You want X, the other party wants Y. In this situation there's no way to satisfy both X and Y. At this point you can fight for what you think is right, or you can fold. The other people want you to fold, and if they're abusive, they're going to try and insult you or make you feel stupid until you do.
Which brings me to some concrete recommendations for being "assertive:"
1. When walking, look like you have somewhere important to go. You're not meandering casually, you're walking with purpose. You're in charge. People are much less likely to approach you if it looks like you're going to turn them down immediately.
2. In conversation, use the "fool me once, shame on you, fool me twice, shame on me" approach. Operate in good faith until you feel that good faith is being abused, then retract it. Don't be angry, but don't let it happen again. "Forgive, but don't forget."
3. Don't apologize for things you didn't do. If you are afraid and feel like you have to apologize, then do it verbally but don't believe it. Tell yourself that you're lying to this person about being sorry. You're not sorry. You're tricking them because they refuse to accept the truth.
4. Think about the reasons people say what they do. Words coming out of a mouth are like symptoms of the mental state of the person. Don't just take them at face value but ask yourself: "Why are they saying this?"
5. If possible, find people you trust who can be a sounding board. Especially if you think your own "assertiveness compass" is whack. Err on the rude side. Then literally describe your encounters to the trusted party afterwards and ask whether you were rude, so you can refine your social barometer.
6. Protect yourself! You're a living organism and you should be your number one priority. Nobody else has the right to make your decisions for you.
Hopefully that's helpful to someone. But like I said, I'm coming at it from a bit of a different angle, so I welcome any feedback / questions.