Originally Posted by
Jeeqbit
The above response answers everything, but note, if you use a macro to change the spell name, it causes it not to be queued, so macros are not recommended most of the time.
Normally, if you press an action, it gets queued so even if you press it right before the global cooldown finishes, it activates when it does finish. But macros prevent this.
You can partially recreate the effect of a queue by repeating the action 15 times in the macro, but it's still not recommended. In some cases you may desire to use a macro even though it's not optimal, such as to assist with your playstyle (mouse over healing, using attacks on the target of your target) or to help with disabilities.