According to myth how did the Greeks get into troy?

All of the Greek soldiers built a giant wooden horse. they climbed inside the wooden horse. The Trojans brought the horse into the city. At night they all climbed out of the horse and started raiding the city.