Template method defines the skeleton of an algorithm in an operation, deferring some steps to client subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
Base class declares algorithm 'placeholders', and derived classes implement the placeholders.
Example - Building a house
We are going to make "algorithm" to build a house. First we want to build foundation, then walls, then windows and roof as the last thing.
WoodenHouse house = new WoodenHouse();
house.build();
Default implementations
We might find that some steps are the same in all implementations of template class. That might be case to put these implementations up, to the template class. We might move buildFoundation and buildRoof into template class because those could be implemented in the same way for all house types. And if not, then we can always override buildFoundation and buildRoof methods.