Once a word’s meaning and part of speech are known, all that remains is determining its function in a sentence. For example:
Puer puellae rosam dat. (The boy is giving a rose to the girl.)
We know that the word “puer" in the nominative case is the subject of the sentence, as we know that the word “rosam" is the direct object in the accusative case. We also know to whom the boy is giving the rose because “puellae" is in the dative case. In contrast:
Puella puero rosam dat. (The girl is giving a rose to the boy.)
Now that the word “puella" is in the nominative case, we know “girl" is the subject of the sentence. “Puero" now in the dative case, is the person to whom to the girl is giving the flower. Notice that “rosam", the object of the verb “dat", remains in the accusative case in both sentences. Also, notice that regardless of the gender of the subject, “dat" remains unchanged as well.
As an inflected language, Latin words change to indicate their function in a sentence. The three nouns in the two examples above (boy, girl, rose) change their form to indicate whether they are the subject, direct object, or indirect object. Take this one last example:
Rosa puellae puerum dat. (The rose is giving a boy to the girl.)
Although nonsensical, this is a grammatically correct sentence. By changing form, the words of a Latin sentence come to life and fit together to form expressions.