If you don't specify the random_state
in your code, then every time you run(execute) your code a new random value is generated and the train and test datasets would have different values each time.
However, if a fixed value is assigned like random_state = 42
then no matter how many times you execute your code the result would be the same .i.e, same values in train and test datasets.