A macro replaces the original text in the code before the compiler start to process the file. I.e. every single place where you use the macro will get a duplicate of the code.

A function is a complete section of code i.e. no duplication occur.

Consider macros to be evil and stick to using functions instead, at least until you have a LOT of programming experience. There is no end in how many hard to solve issues you can create for yourself with the use of macros...