"Excuse Me"... Is it polite or just a terse way to ask others to step aside?
It could be either, and is entirely context and attitude/tone of voice dependent. "Smile when you say that, partner." I'm told English is not so bad as some other languages in this regard - sometimes the meaning is entirely in the "atmosphere" rather than in the grammar.
It can be either, but often enough it's just an acknowledgement that the vagaries of movement have caused either or both of you to inconvenience the other, with no particular implication of anybody needing to do anything. This is illustrated by how often people say "excuse me" in polite tones when it was apparently the other person who made an error.
I would say it is mostly social lubricant.
It depends not just tone of voice, but it also on what part of the anglosphere you happen to be on. British [and related] speakers would likely use excuse me to politely ask someone to make way. Here in the US, it's almost the other way round, where the person who somehow happens to be in your way would be more likely to say excuse me. Regardless of the tone, one may find this rude if they are not used to this particular usage.
I was brought up to always say, "Please, excuse me", and I consider this the gold standard in politeness if you want someone out of your way. If someone were about to bump into me or found me in their way, however, the first thing that would come to my mouth would most likely be, "[Oops,] I'm sorry" (whether or not I was at fault). Most people around me would naturally say, "Excuse me". No please would be required in this context.