If you take Classics you'll be studying classical languages. In the process of this, you'll look at literary, cultural, historical texts and resources in that language. It's likely up to you to choose which direction you focus on (although initially you'll probably have some exposure to all of them), but the overall focus is on the languages typically (although the university in question may lean towards one direction or another for research, which will likely influence what options are available).
For Ancient History, you'll just be looking at the historical and perhaps cultural content in translation. It's unlikely you'll do much with the literary work (in translation or otherwise, unless you took some outside option) in an Ancient History course, although you may have the opportunity to develop one of the classical languages in the usual structure of the course.
This is in general though; the specific degree programmes noted may vary of course. Manchester has a Classics & Ancient History route in the Classics degree, where you do one language and the corresponding history of that culture. St Andrews, in common with other Scottish universities, allows you to start initially with more breadth and potentially combine your subject with another. It's likely you will be able to start studying the classical languages in the Ancient History course there, and you can combine Ancient History with Classics (or either of the individual languages, or Classical Civilisation, i.e. classical literature and culture in translation).
NB I am not a student of either university or subject, this was all available on the course webpages.