As many people know, English has a particularly impoverished case system. This means that we don’t see much evidence of (overt) case to mark grammatical function (like subject or object). If you’ve got a sentence like Mary saw Jim, then you know from the word order that it was Mary (the subject) doing the seeing of Jim (the object). Many languages encode this kind of information via case. Latin, for example, marks the subject of a verb with Nominative case, and the object with Accusative case. If English had any kind of case marking for this, it would look like this:
(1) Mary.NOM saw Jim.ACC.
(2) Mary.NOM slept.
(Obviously, pronouns show case marking in English e.g. I saw him vs he saw me, but there is lots of evidence that this is being further eroded, e.g. between you and me/I, When he saw Paul and me/I, etc. Go look it up in corpora if you don’t believe me!)
You’ll notice above that Nominative case marks the subject of both transitive (example 1) and intransitive sentences (example 2). Some languages which have case marking do not have this alignment at all. Instead, such languages mark the subject of an intransitive verb with the same case as the object of a transitive verb. These languages are known as Ergative languages, as opposed to e.g. Latin, which is an Accusative language. Were English to be an ergative language (and have overt case marking), it would mark its case like this:
(3) Mary.ERG saw Jim.ABS
(4) Mary.ABS slept.
(ABS is short for Absolutive, and ERG Ergative. These are the names of the cases.)
It is clear from these examples that the object in (3), a transitive sentence, is marked with Absolutive case, as is the subject of (4), which is an intransitive sentence. Wacky, eh?
Let’s look at a real example from Basque, pillaged from the Wikipedia article I linked above (so if the gloss isn’t perfect, which it looks like it’s not, sorry! Basque speakers please correct it!)
(5) Gizon-a etorri da.
man-ABS has arrived
‘The man has arrived.’
(6) Gizon-ak mutil-a ikusi du.
man-ERG boy-ABS saw
‘The man saw the boy.’
Even more bizarrely, some languages can show signs of having both a Nominative-Accusative and Ergative-Absolutive case marking. This is known as split ergativity. For example, a language might have Ergative-Absolutive case marking on nouns, but Nominative-Accusative marking on pronouns. Or, like Hindi-Urdu (Wikipedia reckons this is a language…), it might mark subjects in the perfective aspect for transitive verbs in the active voice with Ergative case, while in other aspects (habitual, progressive) subjects appear in the Nominative case.
More weird things that languages do will follow!