Simple answer yes and no. But its more complicated then that.
Depending upon the type and the use some are much better then others but each have their own purpose. Spray foam used around doors and windows is something completely different then foam used to fire stop holes in the floors. Then add to the mix wall or roof type of insulation your looking at something entirely different.
Spray foam used for wall or attic insulation comes basically two ways. Closed Cell and open Cell. Closed cell is much more expensive per inch then Open cell and does not offer as great an R value. But Closed Cell must be used when your insulating an attic that moisture would be moving through. it should be placed against the roof sheathing to prevent moisture in that area which would in turn allow condensation and mold development. We often use closed cell for about two inches, then go over to open cell to build up the R value in the wall area.
In any case, any foam that remains exposed must either be fire rated or sealed using a fire resistant coating, or covered over by fire resistant materials such as wall board.
Chemical types of foams also play a roll in safety. Some use gas to expand the foam. Others use the chemical reaction when two parts are placed or mixed together. Its the two part foams that are really the safest as they release the least amount of harmful gasses and stop once the foam has expanded to its full size. The gas triggered foams continue to expel the propellent over time which becomes harmful to the owner.
I use a two part foam system. It expands as it leaves the spray gun. The product I use is fire resistant, making it a bit more expensive then some of the others available, but its less expensive in my opinion then having to come back and spray a coating back over it to stop flame spread.
If you provide me with some additional ideas of what your looking to do, I may be able to help you figure out what products it is that you should be looking for.
Lastly I can tell you that foam is currently the best for most insulation requirements then any of the others available these days. But not knowing exactly what your trying to accomplish its difficult to answer your question completely.
Can you add foam insulation inside walls are already completed?
Yes you can. Done all the time. However its one of the last things I would address when making the house more energy efficient.
Remember heat moves up. By air sealing the bottom plate area in the crawl space or basement then sealing the top plate along the attic, you in effect have stopped air flow moving through the walls. If the air is not moving the existing insulation works much better.
An example of this that I have talked about before is a sweater on a cold day. You put it on go outside. Feels real warm. A breeze blows then all of a sudden you feel the chill going through you. Same thing happens with insulation. It keeps you warm, until air blows through it then it allows for the heat to be drawn away. Stop the air, you stop the cold.
This is why foam works so well. It stops the air from moving. There are other insulation products that also as part of their system that are sprayed on the new wall to air seal then their green insulation product gets put in. With foam its one stop system. You get the benefit of the higher R value plus the air sealing all in one package.
Foam the top sills, both along the outside walls, and along the tops of the inside walls. Even if you do not see any openings, The space between the wall board and framing is enough to draw out lots of air from the house. Do the same in the basement., Inside walls and outside walls if the basement is not heated or cooled. If the equipment is located in this area, then just do the outside wall area where the framing meets the foundation wall. You do not need a lot, just seal the area with one or two inches then add fiberglass if you like.
Lots of folks think that the vapor barrier stops the air in the wall, Not true. The vapor barrier is just that, a vapor barrier. It stops moisture from getting into the insulation to a point in which it can cool down and condense into a liquid causing mold and other issues. Where within the insulation does this occur? This would depend upon outside temps and how much air is moving through the wall. I have seen condensation form on the back of the vapor barrier and in some cases against the outside plywood. We see this a lot when people install fiberglass insulation in an attic against the roof sheathing. Moisture gets trapped and with cold winter roof the plywood gets wet and rots the roof from the backside out. That is why with fiberglass insulation or even blown in cellulose you need to ventilate to remove moisture. Not heat.
As far as doing the walls to get to your answer, Foam is injected ideally from the outside of the house. As it expands it crushes the old insulation that was installed when the walls were put up. A long pipe is pushed down and in some cases up to it cannot move any more, then as the foam comes out the hose is pulled out until it fills the cavity.