The phrase part of speech refers to an identifying label given to a word based on how it is used in a sentence. Although lists of these labels may differ slightly, grammar books traditionally list eight parts of speech: noun, pronoun, verb, adjective, adverb, conjunction, preposition, interjection.*
Before learning the parts of speech, it is useful to understand why we bother with these classifications in the first place. In brief, having labels for how words function in a sentence helps us to understand better how sentences are constructed and therefore makes us more skillful at putting sentences together.
We can construct sentences without knowing what the parts of speech are, just as we can probably drive a car without knowing the names for the accelerator and the brake. However, we're in big trouble if we don't know that the accelerator causes the car to go faster whereas the brake causes it to slow down or stop. We're also in big trouble if, when we're learning to drive, our instructor tells us to hit the brake and we step on the accelerator instead because we don't know the difference. We have a similar handicap when learning how to write if we don't know the difference between, say, a noun and a verb or what these parts of speech do.
Yes, one can write without even having heard of nouns, pronouns, verbs, adjectives, adverbs, conjunctions, prepositions, and interjections – but knowledge of these terms and their meaning is an important tool for helping us understand how writing works, how to "drive" our sentences, so to speak. Conversely, memorizing these terms and their definitions is no guarantee that we will write effectively; it is only a means to an end, not the end itself.