In Chapter Eighteen of Half-Blood Prince when the Ministry instructor explained that the anti-apparition enchantment had been lifted from the Great Hall for them to practice, he said:
May I emphasize that you will not be able to Apparate outside the walls of this Hall, and that you would be unwise to try.
The implication here seems to be that if you do try to Apparate against the enchantment, some unspecified bad thing will happen to you.
However, in the two instances in which we actually see people trying to Apparate against enchantments, nothing actually seems to happen to them. In Chapter Twenty-Three of Deathly Hallows:
Ron was now trying to Disapparate without a wand.
"There's no way out, Ron," said Luna, watching his fruitless efforts.
In Chapter Twenty-Eight of Deathly Hallows:
The air through which they needed to move seemed to have become solid: They could not Disapparate; the Death Eaters had cast their charms well.
While neither of these two events occur at Hogwarts, we have no reason to assume that the anti-apparition charms at Hogwarts are fundamentally different from anti-apparition charms used elsewhere. Indeed, in Chapter Four of Half-Blood Prince Dumbledore mentions Hogwarts as an example of the anti-apparition charms placed on most Wizarding dwellings, implying that it is the same enchantment:
In any case, most Wizarding dwellings are magically protected from unwanted Apparators. At Hogwarts, for instance —"
"— you can't Apparate anywhere inside the buildings or grounds," said Harry quickly. "Hermione Granger told me."
It would therefore seem that nothing happens when you try to Apparate where there are anti-apparition enchantments in place. The Ministry instructor may have simply been trying to scare them into behaving.
(Montague did nearly die trying to Apparate out of the Vanishing Cabinet, but that was not necessarily related to the fact that Hogwarts had an anti-apparition enchantment.)