Heisler is right, I am a Hirst Arts fanatic. To get started you really only need one or two basic block molds and a floor tile mold of your choice. Fieldstone is my absolute favorite, but if you prefer Egyptian or Gothic style, there is nothing wrong with that. If you have questions about Hirst Arts there are several of us who will be happy to help you out. Start small, and if the bug bites you will soon be buying more molds. We can all tell you our favorite way, but in the end it boils down to the style you prefer. Just get Rastl and I going some time about the proper size of dungeon crawl walls. We both love to argue with each other about it and neither of us will ever change our mind. Neither of us is right or wrong, but we have to much fun arguing to worry about that!
As for using foam, you can do a reasonable job carving rock shapes into pink/blue foam. I have seen some really nice models that were carved from foam. It is lightweight, but it can be broken if it is not handled well. Then again, Hirst Arts builds can get pretty beat up if they receive rough treatment. (Just look close at some of my dungeon layouts) Both mediums can be patched up if the bumps and dings aren't to major.
Foam will cost less, but unless you put a lot of effort into carving it the final result probably won't look as nice as Hirst Arts or Dwarven Forge.