Method overriding happens when a child class defines a method with the same name as one in its parent class. When you create an object of the child class and call that method, the child's version runs instead of the parent's. In the example, the Parent class has a greet method that prints 'Hello from Parent'. The Child class overrides greet to print 'Hello from Child'. When we create a Child object and call greet, it prints the child's message. This shows how overriding changes behavior in subclasses. If the child did not override greet, calling greet on the child object would run the parent's method instead.