It means that IF it hears you say the word 'medic', it will THEN press 'E'. Look at the first picture this is a typical IF statement.
Don't worry if this doesn't make much sense to you right now, it will all become clear eventually.
It means that IF the conditions specified are fulfilled, THEN it will carry out some actions. IF statement The 'if' statement is arguably the most important. Ok now you just need to code! I'll teach you how to code for Team Fortress 2, then you can apply the same technique to any other game.