inline function Vs macros

what is the difference between inline function and macros like if have

#define MAX(X,Y) X>Y?X:Y

inline MAX(X,Y){
return (X>Y?X:Y);
}

which is best in which situation and why ?

//