Do you mean the frame of the screen is loose in the window opening or the screen itself is loose in the frame? It sounds like you mean the window screen/frame is loose in the window in which case I would think it depends on the type of window. If it is a wooden window maybe you can put small wedges between the screen frame and the window frame holding the frame solid against the window sides and jam. If You might also try running the pull and stick foam insulation strips. Just pus the screen tight against the frame and apply the insulation strips tight against the screen. If it is the screen loose in frame again it depends on the type of window. I have vinyl windows and the screen is held in place with a rubber gasket material that you insert into a groove with the screen going in first. There are probably shots/videos on You-Tube that show you how or instructions are on the rubber strip package. I would think that it is the same for aluminum window.
SAme question---Do you mean the frame of the screen is loose in the window opening or the screen itself is loose in the frame?
If its the screen thats loose, you buy a rubber gasket called a spline and the tool to push it into the groove in the frame, then you use a single edge razor blade to cut off the excess screen.... https://www.youtube.com/watch?v=vLO8ValLlQ4 very easy