You have four spells and an auto attack.
Before a teamfight breaks out, have an idea of what you need to use your buttons on.
If you're a carry, plan to go in after you see a certain important enemy spell used, or if YOUR MAIN ENGAGE goes in.
By main engage I mean the person you know has to go in first, it's not necessarily your Malphite.
If you're frontline, focus on positioning between your carry and their frontline, just keep them occupied and allow them to DPS.
Honestly its just having a plan before shit happens.