What you want to do is teach a model how to predict something using your train set, and test it, like in real conditions, with a test set.
For that you have to provide the model some train data associated with the known result, so the model can learn which patern is usually labeled 1 and which one is usually labaled 0. So you have to fit your model giving X_train (data) and y_train (targets, 1 or 0).
Now you want to test your model, so you want to transform X_test USING THE MODEL YOU TRAINED WITH YOUR TRAINING SET, to test your model in "real conditions", so just transform your X_test. Then, you can compare outputs from the X_test transformed to your known test targets (y_test) to evaluate the model performance.
If you fit the model on part or all your test set, you make a mistake, since the data you use to evaluate the model are the one used to train it, so the model may overperform, and your evaluation will be wrong.
I'd really suggest you following some courses before going in practice, in Data Science, there are many issues that you might not see and that will make you have wrong results.