Depending on the actual type and species of mushroom you want to learn about there maybe vast differences in the actual process but the explanation below is similar to most edible and medicinal mushrooms that people grow from home.
Mushrooms produce spores and drop them onto the ground and in the air to spread. They are basically the seeds and are used to spread the next generation of fungi. The spores are released and drop to the surface and make contact with moisture on the ground or humidity in the air. The spores sink down into the soil and begin to germinate producing mycelium. The mycelium grows into a larger mass and spreads out, searching for nutrients and moisture, colonizing its environment and consuming the substrate or soil around it.
Once the mycelium has grown enough to break through the surface it is exposed to sunlight and initiates the next process of growth were the actual mushrooms will begin to form. The temperature of the environment and the amount of light exposure will determine when the mushrooms will being fruiting and each species has its own perameters for growth. Once these specific settings are achieved pinheads will start to form.
Shortly after the pinheads will grow into fully mature mushrooms with stems and caps, the caps will stretch out and open revealing the gills underneath. The gills are were the spores are collected before being released and are held in by a thin layer of mushroom skin called the "veil". Once the mushroom cap grows large enough it will tear the veil releasing the spores and repeating the entire cycle.
Please know that this description is very basic and an attempt at keeping it simple. There is much more detail and amazing events that occur in the life cycle of mushrooms and there is thousands of different species each with there own unique take on the process. If you are interested in learning more about this process please consider reading some of the books available on this website or checkout the mushroom community forums at Shroomtalk.com