Generally being superior over others in some aspect gains you respect. Can be anything.....your achievements, your skill, helpfulness, intelligence, harshness, ruthlessness, etc. Neither one of those will get you respect of ALL people. If you are selfless and go out of your way to help, there will always be those who will see you as a fool. Some will only grant respect to people who are ego-centric condescending assholes. Basically, you ought to choose the audience you associate with and want to appeal to, and work from there. Some actions only impress douchebags, and vice versa.
PS: the point about self-confidence is very important too. It's a prerequisite for everything else. If you don't respect yourself, no one ever ever will.
Generally, I'd say that respect from being trustworthy, kind and honest is the best way to go, as I do. However there are situations where that kind of respect cannot be used. Intimidation from phyiscal appearance and reputation is a better kind of respect to have than intimidating someone via physical/verbal abuse. All in all, general respect wins.
Eh, in day to day life I have found that the best way to get respect is to give it. If you are in a position of leadership you have to be stern, but there are ways to do it that work and ways that don't. If you are controlling a vast amount of uneducated people, then yes, fear works for a time, but it never lasts.
I guess what I mean is, someone can intimidate me all day (I'm a small guy, so w/e) but if anything that is only likely to make me respect them less, not only will I not listen to anything they say, but I will actively show them my disrespect and do everything I can to make their life difficult.
I guess, tl;dr, don't take any shit from anyone, but dont give anyone shit either unless you want a lot of enemies.
Depends on the situation.
When I'm dealing with people who I view as equals, or close to it, I'll work to gain respect in a "general sense", wherein they respect me and I respect them.
On the other hand, when I'm interacting with large groups of people as an authority figure and those individuals don't necessarily view me as someone that needs to be paid attention to (i.e., the Market), I'll swing more towards the "fist of justice" methodology. Though I suppose it should be noted that those methods can also result in general respect, depending on how people respond.
It's really quite subjective.