The Latin Case system, with its 5 basic cases, goes back to the Indo-European system that appears to have had 8 different cases. Those cases were:
Nominative: used to designate the subject of verbs (which is, of course, not always the actor: "I am" or "I suffer" as well as "I run").
Vocative: used for hailing people (or things).
Genitive: which seems to have had two different uses. 1) to turn any noun into the modifier of another noun and 2) to specify the "sphere within which" certain verbal activities took place.
Dative: which designated any person not the direct end or goal of the action, perhaps even any person considered as a person in relationship to the action rather than as an end or an object of the activity.
Accusative: the person or thing that was the direct end or object of the activity.
Ablative: most easily thought of as the "from-function", the true ablative designated people and things that stood in a separative or originary relationship to the action or to the end of the action.
Associative-Instrumental: most easily thought of as the "with-function", this case designated any person, thing, or state of being that accompanied the action: accompaniement, tool, manner. A vestige of the Associative-Instrumental case can be found in the English expression, "the more the merrior"; here, the word "the" is not the definite article, but an old demonstrative in the associative-instrumental case, and the phrase means "by the amount more, so much the merrier" = quo multum eo hilarior.
Locative: most easily thought of as the "in -function" the locative was used to designate location in time or place.
In Classical Latin the Ablative, Associative-Instrumental and the Locative functions were taken over by the Ablative case, leaving the five cases we are familiar with.