Polymorphism allows objects of derived classes to be treated as objects of base classes. There are two types of polymorphism in Java: method overloading and method overriding. Method overloading involves multiple methods of the same name but with different parameters within a class. Method overriding involves redefining methods in a derived class that are already provided in the base class. This allows derived classes to extend the functionality of methods inherited from the base class.