Question from the C++ test

What is the purpose of templates in C++?