When to use train test split? I am new to Machine Learning. I am trying to predict water levels and was given two data sets. 1 file is a Training data set with my water levels and factors that cause it, the other file is Testing data with only the factors and not including the actual water levels. I am thinking of using the method of Decisions trees, would I just make a model using my Training and then compare it to my Testing data?
p.s sorry if this sounds confusing

As Henry says in a comment, this seems to be an exercise in which you will build a model on a specified training data set, then make predictions on another, test, data set. The actual outcomes (water levels) in the test set are hidden from you and will be used by someone else to evaluate the quality of the model you developed on the training data set.
From that perspective, you have the right idea about how to proceed. In addition to the reference suggested by Sycorax, An Introduction to Statistical Learning is a helpful guide to different modeling approaches.
To answer the question posed in the title, a strict train/test split like this is not usually reliable in practice unless you have tens of thousands of cases, as usεr11852 indicates in a comment. Frank Harrell discusses that in a blog post. With completely separate train and test sets, you tend to lose precision in developing the model and to lose power in evaluating model performance.
A better approach with smaller data sets is to build the model on the full data set and then check the performance of the modeling approach with resampling from the full data set and re-modeling the same way on each resample.
Bootstrapping is an efficient way to do that; you check models based on each of multiple bootstrap samples on the full data set.
Repeated cross validation is another, which fits into the general idea of train/test splits. You split the sample into, say, 10 subsets. You set aside one subset as a test set, build the model on the other 9 subsets, then test on the 10th subset. Repeat by holding out each of the subsets, remodeling, and re-testing. Then repeat the entire process many times on new reshuffled subsets.
