When you beat the game, a little path opens up in route 214
You just follow the path and enter to Turnback Cave (You also need rock climb HM)
Once there is like a maze.
There is no way to consistently traverse the cave as rooms are always randomized upon entry, but the best hint to navigate the puzzle is to look at the pattern of rocks on the floor of each room, and enter the door out of the three which has the odd pattern ~ Bulbapedia
Finally youre getting your fight against Giratina, Hope i helped :D