So macros is also what people call scripts or hacks?
A macro is a series of keypressed (or other outputs) done by the computer automatically. For example if you are playing a champ with a specific combo that requires perfect timing, you can set the macro to always 100% hit the right keys, at the right times, in the right order.
It can definently be called a hack.
It's only generally considered cheating when using it for the purposes of improving your gameplay, such as in the example i provided. More examples can include things like an automatic instant Lee Sin ward jump (however you shouldn't assume that players that are good at ward jumps are cheating).
If it's just used for chat, not for anything else, it's not considered cheating.
A script on the other hand makes decisions for you, something a macro can't do. It can take in inputs, process them, and provide outputs. A macro can't be set up to automatically dodge a skillshot, because it can't take in any information about the game itself. A script reads the game and can move your champion appropriately.
huh I thought that macro has to do with gameplay knowledge.
In certain context, it does.
For example when esports caster the refer to macro, they usually mean macro-play or macro-management, which requires alot of game knowledge to master.
I also heard from some people that a way to bind mastery emote to the emote wheel or to an ability requires some tampering with the League code to make it so the emote or mastery will flash when you press whatever value or button you set it to, so would that also count as macro in this case?
If you have it set up to complete 2 actions with the press of a key, then yes, it's considered a macro. Whether or not this specific kind of macro is bannable, is largely in the grey area.