Yardrat is the planet the Ginyu Force were scheduled to invade before being relocated to Namek. After Goku could not start Frieza's spaceship, he finds the Ginyu Force's ships nearby and takes one of them. The coordinates for Yardrat were already programmed on the ship's computer, and thus it goes to this planet with Goku inside.
While on the planet, the Yardrats nurse Goku back to good health. Soon afterwards, he is taught the Instant Transmission technique by them. Goku stays on the planet for about a year before heading back to Earth.