Solar can be mounted to roofs in two main ways. Fixed mount or ballast mount.
Fixed mount solar systems can consist of either pole mounted racking systems or L-Foot flashing attachments. Both of these utilize rails that attach to an L-Foot typically, and this L-foot then has rail or extrusion attached to it to hold the solar panels. They both penetrate the roof surface, but can easily be waterproofed, often times with water-proofing mechanisms built in or easily added. These are the primary two mounting types used for pitched roofs or surfaces. However, for standing seam metal pitched roofs, there is a special clamp to hold the panels into place.
Ballest mounts typically consist of a metal tray bases that use weight (typically ballast block) to hold the mounts and solar system down to the roof surface. These are typically used on residential and commercial flat roofs, and typically require no penetrations to the roof surface.