A prefix is added in front of a word or a root to create a new word. By adding a prefix, you enhance or change its meaning.
Although you cannot tell the meaning of a word from the prefix alone, the prefix can help you get an idea of what the word is about.
In fact, you can look at the prefix of prefix to determine the meaning: pre- means before and the root, fix means fix or attach. So, by combining the meanings, you can figure out that prefix means attach before. And that is exactly what you do with a prefix: You attach it before the root. In other words, a prefix appears at the beginning of a word.