Case is a somewhat complicated issue, because it is a term that is quite polysemous - it signifies quite distinct things when used at quite distinct levels of analysis. However, its primary use clearly is with regards to morphological case.
Morphological case notably appears in several classical languages - Latin, Greek, Sanskrit - but also in any number of modern languages - German, Finnish, Russian, Georgian, Turkish, etc.
Classically, case is a morphological way of marking the role a noun (or other noun-like word) has in the sentence. For instance,
Jaakko | ost | -i | auto | -n |
Jaakko(NOM) | buy | -PAST | car | -GEN |
Jaakko-n auto-sta soi musiikki-aJaakko-GEN car-ELA ring music-PART
Jaakko osti auton, Jaakko bought the car. From Jaakko's car there is music playing. In this case in Finnish, the singular genitive is identical in form to the singular accusative, the genitive also serving a role similar to English -'s. In comparison
Иаков купил машину
Yakov bought car-acc
-у is almost exclusively used for feminine accusatives, and masculine and neuter datives. Anyways, quite obvious. Affixes mark case, and we can list them like, say, Finnish: auto, auton, autoa, autossa, autolla, ... We know from Latin and Russian that a case needn't be distinct throughout the paradigm to qualify as a distinct case: Russian conflates nominative and accusative for inanimate masculines and neuters, but distinguishes locative and dative for those; on the other hand, it conflates dative and prepositional for feminines. Latin likewise conflates some cases for some subsets of the noun system.
We can go on and look at some other 'popular' cases:
Jaakko anto-i kirje-en äidi-lle-si
Jaakko give-PAST.3sg letter-ACC mother-TO-2SG.POSS
Jaakko gave letter to your mother
Jaakko gave your mother a letter
Jaakko hat deiner Mutter einen Brief gegeben
Jaako has your-FEM.DAT Mother one-ACC letter GE-given
Jaakko has given your mother a letter
Jaakko gave your mother a letter
The -si suffix in Finnish is not a case, really - it's more like English 'your', but tacked on to the noun. This is known as a possessive suffix. It is not a case since it does not tell us anything about the syntactic role of the noun. We can see this is not a case, since if we replace it by any other suffix out of the same set, we have not changed the role of the mother, we have only changed whose mother it is - however, if we change
-lle-, we go and alter what role she has in the sentence.
äidiltäsi, for instance, would code for 'from your mother', and some cases would simply make the sentence unparseable.
In German, very few cases are marked directly on the noun. Generally, case marking goes on adjectives and articles. Case, ultimately, more often is relevant on a
phrasal level, not a word-level. I.e. when we say
he bought a big red car, if 'car' were marked for some case, it'd generally reflect the role that the whole phrase
a big red car has in the context. Therefore also, some languages mark other constituents as well, c.f. how Finnish would render it:
hän osti iso-n punaise-n auto-n
In both of the examples above, 'mother' is marked with the case that in that language marks the recipient of an action. In Finnish, this also marks the destination of a movement (and more specifically, a destination external to the noun so marked). In German, the dative is not used for destinations, but more often to mark that the preceding preposition marks position rather than destination.
What do cases do? Well, a lot of the same roles that prepositions do in English, but also some other roles. English has about three cases - nominative (nouns in singular and plural, I, you, he, she, it, we, you, they), genitive (-'s, -s') and some kind of oblique/accusative/dative for pronouns (me, you, him, her, us, you, them, whom). We may notice that objects in English are nominative for nouns and several pronouns (anyone, someone, etc), but accusative for those pronouns that I listed above. Same goes for indirect objects. Some languages have separate markers for those. Some languages also have separate prepositions for such roles, c.f. also English 'to' as an indirect object marker. The Spanish object marker a may serve as an example here.
However, some languages also distinguish the functions of an adposition by different cases. Examples of such languages are German, Russian and Latin. So for instance, в(о), /v(а)/ signifies 'in' with the noun in the locative and 'into' with the noun in the accusative in Russian.
Next up: differential object marking (or ergativity?)