Play the opening moves you know quickly and save your time for critical moments: exchanges, decisions to attack, the transition to the endgame.
A rough rule: by move forty you should have used about half of your total time. When you are low on time, choose simple and safe moves.
In games with increment (for example 3+2) every move earns you time. When you are very short of time, premoves help too, but use them carefully.
Use your clock like a budget: play the opening quickly, and spend time at critical moments such as tactics, changes of plan or the transition to an endgame. Don't think for minutes over simple or forced moves.
In time trouble the rule is: play safe, simple moves, keep your king protected and check your opponent's forcing moves. With an increment, remember you gain a few seconds each move.