Well, both cities are located on the edge of the Rhine valley, at the bottom of forested mountain ranges: The Odenwald next to Heidelberg and the Black Forest next to Freiburg. The mountains of the Black Forest are significantly higher than the Odenwald.
Another difference: Heidelberg is one of the major destinations for tourists from overseas (America, east Asia) visiting Germany. So you'll probably see lots of tourists there. Of course there are tourists in Freiburg as well, but much less than in Heidelberg.