In JavaScript, the meaning of 'this' inside a function depends on how the function is called. When a function is called as a method of an object, 'this' refers to that object. For example, calling obj.greet() sets 'this' to obj inside greet. If the function is called standalone, like just greet(), then 'this' is undefined in strict mode or the global object otherwise. Arrow functions do not have their own 'this'; they use 'this' from the surrounding code. This behavior is shown step-by-step in the execution table where obj.greet() calls greet with 'this' as obj, and the function prints the name 'Alice'.