This example shows method overriding in Ruby. First, a Parent class defines a greet method that prints a message. Then, a Child class inherits Parent and defines its own greet method, replacing the parent's. When we create a Child object and call greet on it, Ruby runs the Child's greet method, not the Parent's. This is method overriding: the child class changes the behavior of a method inherited from the parent. If the child did not define greet, calling greet on the child would run the parent's method instead. This lets subclasses customize or replace behavior from their parent classes.