They don't actually explain *how* they get there, only where they go. They end up at a small, abandoned house in the grounds of Hogwarts.
The scene is a bit mysterious, with the house appearing out of nowhere. It's implied that it's an old, forgotten spot known only to a few. It could be:
* A secret place Ginny knows: Perhaps it's a place she learned about from her family, who are well-versed in Hogwarts's secrets.
* A hidden location in the book: The Half-Blood Prince's copy of the book might have contained hints or clues to this location.
* Harry's intuition: As a powerful wizard, Harry might have felt drawn to this place instinctively.
Ultimately, the exact method is left ambiguous, adding to the mystery and suspense of the scene.