Layout Inflator

what is an Layout Inflater and how does it works?

The LayoutInflater class is used to instantiate the contents of layout XML files into their corresponding View objects.

In other words, it takes an XML file as input and builds the View objects from it.

You can read more about it from official documentation.

Is setContentView() also a type of inflater?

Yes
LayoutInflater.inflate can be used in an Activity, as an alternative to setContentView