There are certain words in the Torah which are not read the way they are written. Although the words are written in a certain way, we have a tradition dating back to Moshe at Mount Sinai to read them differently. For example, there is a word toward the beginning of Sefer Bamidbar which is written "Keri’eh," but our tradition teaches us to pronounce it "Keru’eh." In Sefer Devarim, there is word written "Yishgalena" which is read as "Yishkabena." Another example is the word "Ke’omram" in Megillat Ester, which is written, "Be’omram." This is called "Keri" and "Ketib" ("read" and "written").
Although the reader does not read these words the way they are written, this is nevertheless a valid reading, and he is not considered to be reading from memory, as long as he looks at the word as he reads it.
The Shulhan Aruch discusses the importance of reading the word according to tradition, and the need for the reader to prepare ahead of time so he knows how to pronounce the words. Without proper preparation, he may read the word the way it is written, and not the way it is to be read. Interestingly, the Shulhan Aruch – which normally just states the laws – tells the story of a reader who refused to read according to tradition, and instead read the word the way it was written. The Rabbis reacted angrily and excommunicated the man for denying our oral tradition. It is highly unusual for the Shulhan Aruch to tell a story, and this emphasizes the importance of preparing the reading ahead of time from a traditional source, so one knows how to properly pronounce all the words.