"What" as an English question word can be translated to three different words in Portuguese, depending on the context. (The explanations below may seem very weird and confusing, but they're really how we use it):
"O que": when asking for something you know exists but you don't know what it is. You want that thing to be the answer of your question. For example: "O que você está comendo?" = What are you eating? -> you know that the person is eating something, but you don't know what it is, so you ask what the thing is and the answer should be the name of the thing or something that simply explains what it is. In this case you use "o que".
"Qual": when there's a list of things that could be the answer (you being aware of all the things of the list) and then you are asking what thing, out of that list, it is. For example: "Qual é a cor da sua camisa?" = What's your shirt's color? -> you know a whole list of colors that could be the answer, but you're asking for the one color, out of that list, that really is in his shirt.
"Como": I believe there is only one possible situation in which "what" can be translated to "como" in Portuguese: when you're asking what someone just said. But, in this very same situation, "what" can also be translated to "(o) quê" (the "o" is optional and the "quê" is written with accent "^" because it's the last word in the question): "Como?" = "O quê?" = "Quê?" = "What [did you just say]?" -> Attention: when you say "como?" in Portuguese, in this occasion, it's more respectful and formal than "o quê?"; and "quê?" is even more informal - if used in the wrong occasion it can sound very rude.