The history of the city dates back to the Romans, when over 1,000 years ago Constantine the Great established a stronghold in what is now Visegrád. King Bela IV and King Matthias Corvinus spent time here, and by the 16th century much of the city was destroyed during the Turkish invasion.
Though Visegrád is a worthy destination in its own right, it's really one of three cities worth exploring from Budapest, along with Esztergom and Szentendre. See all three in a day with a sightseeing tour. Private tours typically offer convenient hotel pickup, while Danube Bend group outings offer the best value. If you're only checking out Visegrád, you can hop a train from Budapest, and explore the palace and citadel independently.