A melee spell attack follows all the rules of a traditional melee attack. The applicable rules are on page 195/205 of the PHB or 73/81 in the Basic Rules pdf.
Most creatures have a 5-foot reach and can thus attack targets within
5 feet of them when making a melee attack. Certain creatures
(typically those larger than Medium) have melee attacks with a greater
reach than 5 feet, as noted in their descriptions.
In this case, thorn whip attacks like a melee weapon with 30-foot reach.
The difference between a melee attack and ranged attack is that a ranged attack suffers disadvantage if you're within 5 feet of an enemy while a melee attack is not affected.
In addition, a melee spell attack like a ranged spell attack uses your spell attack modifier (spellcasting ability + proficiency).