Spacecraft operating in the inner Solar System usually use electronics-managed photovoltaic solar panels to derive electricity from sunlight. Outside the orbit of Jupiter, solar radiation is too weak to produce sufficient power with solar technology, so radioisotope thermoelectric generators (RTGs) are used as a power source.
The first US spacecraft, the Vanguard 1 satellite in 1958, was powered by silicon solar cells with ≈10% conversion efficiency. The system using solar cells recharging a battery pack provided the required power in a much lighter overall package than using just a battery. A few weeks later the Soviet space program launched Sputnik 3 with Silver zinc batteries and experimental silicon solar cells. Some of the batteries were covered with protective glass while others were left exposed so as to test the long term effects of radiation and micrometeorite damage on solar batteries.
Spectrolab, an optics company, developed solar cells specifically designed for space applications. They later pioneered the development of multi-junction cells that increased efficiency from around 12% for their 1970s silicon cells to about 30% for their current gallium arsenide (GaAs) cells. These types of cells are now used almost universally on all solar-powered spacecraft.
Solar panels on spacecraft supply power to run the sensors, active heating, cooling and telemetry. A typical solar panels on spacecraft uses close-packed solar cell rectangles that cover nearly 100% of the Sun-visible area of the solar panels. Some spacecraft use solar wafer circles which, even though close-packed, cover about 90% of the Sun-visible area of typical solar panels on Earth. Some solar panels on spacecraft have solar cells that cover only 30% of the Sun-visible area.
Spacecraft are built so that the solar panels can be pivoted as the spacecraft moves so they can always stay in the direct path of the light rays no matter how the spacecraft is pointed. A tracking mechanism is often incorporated into the solar arrays to keep the array pointed towards the sun.
The Skylab Solar Array System (SAS) design included two main solar arrays and four smaller arrays attached to the Apollo Telescope Mount. The main Arrays were housed in two long canisters attached to the sides of the Orbital Workshop. These would swing out, once Skylab was in orbit, and deploy the arrays,
Unfortunately one of the main arrays was destroyed and lost during Skylab's launch. Also the remaining main array failed to deploy when in orbit. This would have made the station un-usable. Fortunately the first visiting crew, Skylab 2, were able to free the stuck array, allowing Skylab to complete it's missions.
References: Wikipedia - Solar Panels on Spacecraft | Historic Spacecraft - Skylab Solar Array System (SAS)