Usually caulk will do the job, depending on the problem.
The first and easiest fix is to caulk the perimeter of the window inside and outside. If that doesn’t do it, then the next best alternative is to replace the window.
If it is an old style window it may require new glazing to fix it.
To repair a leaky window you should first determine where the leak is coming from. Water test the areas to locate the root of the problem. If it’s the frame of the window, caulking around will be the best way to fix.