Wether you are looking for extruded polystyrene of EVA floor mats, they are readily available at any hardware store such as Lowes, Home Depot, etc. Really any store that has a lumber yard should have it. Ireccomend a 5 cm or 2 inches thickness for extruded polystyrene if you plan to carve away from the material. It does make it harder to cut through the 2 inches but you have a lot more breathing room after.
You will usually find the extruded polystyrene sheets in the lumber yard and the floor mats in the store. My local hardware store is a Rona (pretty much canadian Lowes) so that's where I get the foam and any other materials I might need such as wooden rods, MDF or plastic sheets and those coloured cardbaords where there are paint colours so I can replicate them with my acrylics.
Hobby stores and art places such as Micheals also often have cool stuff that you can work with too. Altough I doubt what you want to do is to buy a canvas and paint on it, It is always worth a look, you never know what crazy object you might find and be able to use.
If you are starting out, get a 9mm and 18mm exacto knives and lots of replacement blades or something to resharpen them as foam blunts the crap out of you blades. On a single rifle size project, I go through 5 to 10 blades of various types tough I was able to cut my consumption in blades thanks to my hotwire table.
Hope I was helpfull and good luck in your projects!