Without upgrading hardware (And if you're running windows): Select "High Performance" in power options Close unnecessary apps that aren't required while gaming Have the latest graphics drivers Depending on the game, go in the settings and lower overall graphics options and disable vsync Go into the games configuration and make changes there (Youtube tutorials can be found) In task manager, set the task priority of the game to "High", if you don't know how to do this then you can find videos on how to do so on youtube.
Overclock your CPU and Graphics card if supported (Plenty of tutorials online) (Keep in mind it might decrease the lifespan)
Upgrading hardware: Get more ram (8gb ram for most games should be fine but some newer games are a bit more demanding so you should consider getting 16gb instead) Get a good graphics card and CPU (Make sure you have a motherboard that supports the CPU and Graphics card you choose and make sure you have a big enough power supply.) Make sure you have a look at game requirements for games you like (Don't go overkill)