A decision tree partitions inputs with a sequence of threshold rules. Unlike a linear model, it can represent interactions without you adding an interaction column first. A classification tree predicts categories, while a regression tree predicts numeric values within its leaves. Both can memorize small training samples if you let them grow freely.
Depth limits constrain the number of successive decisions. The tasks specify a small max_depth and random_state so you can compare fits repeatably. Trees generally do not need standardization because a rescaling preserves the order of a numeric feature. They still need an honest holdout. Training on the test rows or swapping a classifier for a regressor does not satisfy the experiment, even when the resulting code runs and returns one number per row.