Heidelberg is a city of around 150,000 and indeed a "tourist town" in part. Americans tend to be familiar with it as a result of the decades-long US military presence there and perhaps the once-sorta-popular Heidelberg beer. It's also been a popular study-abroad campus for American university students. The military population there used to be around 20,000, and over the decades since WW II, many times that number of American personnel have entered and exited the military's revolving-door population. Many of these folks return to show their kids the Germany they came to know, or where Grandpa served, etc... So it's a place name that's on the tongue and in the ears of many Americans and naturally gets some visitors because of name recognition alone.
The "castle" there is actually a ruined palace rather than a knight's castle like those on the Rhine (of which Marksburg is a good example.) It suffered centuries ago at the hands of invaders and lightning strikes. A lot of people like to go there but it did not impress me mightily in light of the other well-preserved palace options (like Ludwigsburg) scattered around Germany.
Here's a quickie primer on H'berg and its palace ruins - see if it's what you're looking for:
https://en.wikipedia.org/wiki/Heidelberg