We have had mixed reviews on using our acoustic foam panels for keeping outside sounds from coming through windows. The product is not designed for this use, but some people have had success.
Acoustic foam panels are designed to absorb sound waves in the room in which they are placed. They could help reduce noise coming from outside or a loud neighbor, but will not block the noise completely. If you place the foam on your side of the wall the foam will absorb some of the noise and vibrations, but not everything by any means.
We have had customers construct a panel out of cardboard/plywood, then mount the foam onto the cardboard/plywood. This constructed panel can be used to plug the window with the acoustic foam facing the windows. You could also mount the foam directly onto the window if you do not need the window at all.
Some other easy and cheap ideas for windows are weatherstripping and thick curtains. Many times there are small cracks in the windows that are letting the sound through. Weatherstripping can help tackle that problem fairly easy (Duck brand sells some good stuff). Thick curtains will also help dampen sound. Even having a thick comforter over the window might help if you have an extra one around.
The true fix to preventing unwanted outside noise from coming into your room is to increase the transmission loss of the acoustical barrier. This could mean buying new thicker windows with a better seal, adding more noise blocking insulation inside of the walls and structure of the building or by replacing a light gypsum board wall with a thicker brick or concrete wall.
If you live in an apartment building your landlord probably won’t jump at the idea of modifying the building structure so you may be stuck with trying thick curtains and acoustic foam to try and ease the noise a bit.
Hope this was helpful. Please contact us with any questions about your acoustic or noise problem. We are glad to help!