Did cavalry in Ancient/Medieval times actually make contact with the enemy when charging them, or were cavalry charges more for intimidation?

Cavalry certainly made contact with the enemy at certain points. Of course, there are certain risks for performing a cavalry charge in many situations. Cavalry charging into a tight formation of disciplined infantry would be vulnerable. Especially if they're not heavily armored cavalry, and even if they are. In fact, before the proper invention of the stirrup, cavalry couldn't exactly fulfill the shock role that we associated with it.

Most cavalry charges occurred due to infantry breaking formation and therefore being much more susceptible and could be effectively finished off. This makes quite a bit more sense than charging into a mass of infantry. Cavalry also needed to work in conjunction with infantry and missile troops. However, in some cases cavalry had such long lances/spears that it was possible to inflict shock casualties on formed infantry. Examples include Alexander's Companion Cavalry and the Polish Winged Hussars.

It is important to acknowledge differences of cavalry in the Medieval and Ancient times. It is true that the Romans and other civilizations at that time mainly focused their armies on heavier infantry with cavalry often being put in a support role. During the Medieval era, cavalry came to dominate the battlefield, not solely in Europe but in India and the Middle East as well.

The reason behind this is that after the Western Roman Empire ended, the kingdoms that rose from what remained were more feudal in nature. This made recruiting and maintaining skilled infantry much more difficult, just simply too expensive to be practical. Furthermore, cavalry had the advantage of being able to withstand missiles better while also retaining a lot of speed mobility. It was easier to retain a smaller retinue of knights who you paid with land than to maintain tens of thousands of heavy infantry that needed to be drilled and trained year long.

Interestingly enough, heavy cavalry came to be preferred in Western Europe because there wasn't a particularly strong horse archery culture for them at that time. Most cavalry fought a bit more hand-to-hand, eventually leading to the preference of heavy cavalry which had obvious benefits in such a situation.

/r/AskHistorians Thread