The movie Avengers: Infinity Wars starts from the end of Thor: Ragnarok. So we assume that Thor and the remaining Asgardians find Thanos's spaceship approaching them and Thanos attacks the entire ship. The scene starts off with the only survivors being Thor, Loki and Heimdall facing Thanos and his children.
At the same time the Guardians of the Galaxy seem to be coursing towards Thor/Grandmaster's vessel and Quill mentions that they received a distress signal. I would like to have some explanation of how the three worlds meet :Thor's + Thanos + GOG . what was the pre plot of these three worlds before Infinity War begins?