Determining parts of speech is nothing more than determining the function/job a particular word has in a sentence. They all play a role in the sentence, and one word might be a noun one time and a verb the next.
Let’s take the word run for example.
Let’s go on a RUN after school. (NOUN)
I will RUN to the cafeteria to be first in line (VERB)