"The trains are not new."
Translation:A vonatok nem újak.
You can't distinguish -ok and -ak just by looking at the last vowel - both can appear with a back vowel word and basically you just have to learn it. These two words can be considered regular as the majority of nouns take o whereas the overwhelming majority of adjectives take a.
I see. "Vonatok" is the subject of the sentence, it is in the nominative. We use the accusative when the noun is the direct object of a verb.
"Én nem látok vonatokat." - I do not see trains.
"Én" is the subject, it is in the nominative. "Vonatokat" is the object, it is in the accusative.