Since there is no strict word order in Russian, cases indicate the role a noun, pronoun or adjective plays in the sentence.
You have the subject that is always in Nominative. Therefore, if you see some other case you can safely assume this noun, pronoun or adjective is not the subject.