It's quite complicated to explain in detail, and there are a number of different processes, but I can start by saying how the essential chemistry
of B&W processing works.
A film emulsion contains tiny crystals of a silver halide (Silver chloride, bromide etc.) contained in a layer of gelatin, coated on a plastic backing. Silver halides are sensitive to light.
There are other layers such as an anti-reflection layer behind the light sensitive layer to prevent light being scattered back to produce a 'halo' around bright areas, (Anti-halation layer) and a scratch resistant layer on the front.
Additionally dye chemicals are added which enhance the halides sensitivity to red light, to which otherwise it would be insensitive. These are known as dye sensitisers.
Only imprefections in the crystals are actually sensitive, as these contain silver ions which are not fully bound to the halogen. When a photon interacts with the crystal near the sensitve site an electron is released which can reduce the ion to a single atom of silver.
These single atoms ar enot enough to produce a visible image, but comprise a latent image within the emulsion. In order to make the latent image visible we must amplify the latent image in some way. This is done chemically by a process known as development.
There are a number of chemicals formulations which can be used as developers (including urine!), but all are chemical reducing agents. (Opposite of oxidising agents.) These convert the silver halide to metallic silver.
It so happens that for many reducing agents metallic silver acts as a catalyst, so where there is silver the reaction proceeds faster than where there is not. Of course as more silver is produced the greater the catalytic action, so the develoment process accellerated as it progesses.
This forms clumps of silver around the original silver atoms. These clumps consist of very small grains of silver, finer than any powder and these appear black. These form a negative image. (Black where light fell on the film.)
(These tiny grains are not what photgraphers refer to as 'grain'. In fact the 'grain' in a photograph is more to do with the distribution of development sites, and the random nature of the arrival of individual photons.)
Most developers are realtively benign chemicals but some are toxic and carcinogenic. These are not used much these days but are still availble.
Unfortunatley this is quite a slow process, and there is a tendency to also reduce unexposed halides somewhat. This produces an overall 'fog' to the immage. To minimise this and speed the process up an accellerator is usally added.
Accellerators are alkalis. Some formulas use quite strong alkalis like sodium hydroxide, but others use rather innoccuos substances like borax.
Development continues until the developing chemical is removed or the chemicals are exhausted. If the film is developed too much than the silver clumps begin to overlap and you get a completly black area. Further development does not make those areas any blacker even if more silver is produced!
This process is of course conducted entirely in darkness.
Most formulations use both developer and acellerator together, but sometimes these are used separatley to give better controll of the negative density. Here the emulsion is soaked in the developer, and transferred to the accellerator bath. This limits the amount of developer in the negative so heavily exposed areas do not develop as much. This allow a scene with a wider range of brightness to be recorded.
(Note that the film itself can record a much wider range in the latent image, than can be developed.)
Normally development is stopped by immersing the film in an acidic bath, which reacts with the accellerator as well as washing away developer.
The anti-halation layer dyes are usually washed out during develpment.
Of course this still leaves undeveloped silver halides in the emulsion. These are removed by fixing the image.
This is necesary for two reasons. First in a film the halide crystals have a whilte milky appearance. You need light to shine through a film duing enlargement, so that's no good. Alxo the halide will eventually turn black on exposure to light.
Fixing the image usually is a matter of washing the negative in a soultion of sodium thiosuphate. (Comonly called 'hypo'.) Silver halides are only very poorly soluble in water, but sodium thiosulhpates affinity for soft metal ions overcomes this reaction with the silver, to produce sodium halide. If this is silver chloride you get salt!)
To get a print, you expose paper treated on one surface with an emulsion, to a projected image of the enlarger and develop that in a similar way.
So there you have it. Color is a bit more complicated involving layer with different sesitivity to colored light, and dyes which are produced by the action of delvelopers.
For more details start with http://en.wikipedia.org/wiki/Photography