When a solar array is installed on your roof, it will be installed on one of the available solar racking systems. Depending on your roof type, how the mounts are installed will vary. Sometimes they will be put right into the roofing, other times they will be slipped under the roofing, and other times the roofing will have to be removed or replaced to install the mounts.
Once the mounts are installed, they will protrude out from the surface of the roof. Then, your installer will install the racking system for the panels to be mounted on. Once the racking system is installed, the panels will be secured to the racking system. Panels will have to be off the surface of the roof a bit so they don’t overheat and can produce at a top level. There are options for lower racking systems or a skirt for a more aesthetically pleasing array.
There is always the option for a ground mounted system as well. In order to pull off a ground mounted system, you’d have to have a decent amount of area on your property that gets adequate sunlight. However, ground mounted systems, usually cost more than roof mounted systems.