Cases. "pies" is Nominative - the basic, dictionary form. Which you should know well given your level in German :) "psa" is Accusative. I don't remember if it works the same in German, but I suspect it does. But just in case, it's used for the direct object.
Here, "pies" is Nominative and "dzieci" are Accusative. But "dzieci" is 'not masculine-personal plural', so its Accusative is identical to Nominative. Theferofe, if we were to turn this sentence around, we'd have "Dzieci lubią psa" (The children like the dog).