How is multiclass classification trained and predicted for XGBoost?

I am currently working with XGBoost for a multiclass classification problem. However I don’t really know how XGBoost performs its mutliclass classification. Because of the requirement of the labels to be from 0 to num_class - 1 it feels like the encoding has an ordinal relation to it which my labels don’t really have. Or does it internally use something like one-vs-rest so that this ordinal assumption isn’t made about the classes?

Thanks in advance.

you can watch the tree number for multiclass classification, for one n_estimators,there will be n_classes's tree.