Words in latin are divided into 5 grammatical cases.
Nominative: The Subject, a predicate noun, a predicate adjective, or a noun in apposition
Genitive: possesion such as the sword of the solider the solider's sword, with certin adjectives, a genitive of material, or the quality of something
Dative: mostly indirect objects, used with intransitive verbs, with certain comparative adjecttives,pssesion used with esse and the dative
Accusative: a direct object, in apposition, objects of prepotitions like ad, display of time
Ablative: used with cum or with, with whom, with which or accopianment, how or manner, quality, where in which