Let me start off by saying there were some regional differences between Southern America (Western coast) , the Caribean Islands and Meso-America (modern day Mexican). In general, when the spanish conquistadores (the most famous ones being Cortès and the Pizzaro's) arrived in the new world, the Spanish crown repayed them for their services through the system of encomiendas. This means that they were allowed to tax the native people, not through goods or money, but through work. The encomenderos were de facto in charge of the administration in the earlier years of the colonization. This system was hereditary, which meant that the offspring of the conquistadores could demand the same amount of work (called repartimiento). On the earliest voyages the Spanish crown had refrained from sending along Royal officials. After having conquered a region, the leaders of the expeditions held the military power of that area as adelantados (captain-generals) and they also held the civil authority as gouvernours. On top of that they often also functioned as the leaders of the regional clan of encomenderos (owners of working natives). This meant that a lot of power was concentrated in these individuals, which threatened the authority of the Spanish Crown in its new-conquered lands.
Let me start off with the institutions that were founden in Spain itself to govern the new lands efficiently. In 1524 the Consejo de Indias (councel for the Indies) was founded. At the time of its creation it counted a president, 4 advisers and a staff of jurists. In practice it was de source of all legislation on the American continent, concerning trade, finances, military endeavours and the Church (Patronato real). Trade with the territories overseas was governed by the Casa de la Contractación. It was also responsible for the equipment of the fleets and controllinging the ships. In 1543 the Consulado de mercaderes was founded in Sevilla, which grouped all the merchants and adjucated between merchants if problems arrived.
The Spanish Crown, wanting to assure the crown's dominance in the area's, aimed to reduce the power of the former conquistadores. It tried to do so by sending gouvernours and officals, whose aim was to reduce the personal power of the Conquistadores. For example: In 1526 King Charles V sent official Louis Ponce de Léon to Mexicon, to take Cortès position of power. From 1535 on, the Crown would use the system of 'viceroys'. They stood in direct contact with the King in Spain, and governed in his stead. He was the primary administrative offical, was responsible for the treasury and collected the taxes. Furthermore he was the military commander and functioned as presient of the audiencia in his capital. Overall the power of the original conquistadores would be completely taken away, which they were not happy about.
The foundation of the Spanish colonial administration were the audiencias. They were used to keep the conquistadores in check and held strong judidial and executive power. The members of the audiencias corresponded directly with the Spanish King and thus functioned as the real royal representatives in the America's (more than the 'viceroys'). Members of the audiencias were appointed directly by the king (not by the viceroys!).
The administrative structures below the level of the viceroys and the audiencias are a little unclear. They were the consequences of ad hoc decisions, more than the results of a well-thought-out and organised admiistrative structure. Gouvernours were installed in more remote areas where a strong figure was needed to defend the territory. In general, the further they found themselves from the viceroys and audiencias, the more power they gathered for themselves. The corregidores were the hierarchical highes officals which came in direct contact with the native people. they replaced the encomenderos (supra) and presidented the cabildo (city counsil). The royal taxes were collected by the cajas reales, which were for the most part found in ports, mining centra and administrative capitals. They consisited of at least 3 officals, appointed by the king himself.
Finally, the Spanish used the already existing structures in the America's to govern it. Take for examples the Aztec Empire (North Mexico). The Aztecs had already developped an organised sytem to keep the peoples they conquered in check and collect their taxes. Next to the system of Encomienderas, the Spanish people simply replaced the Aztecs and just collected the same taxes in their place. Keep in mind that at first they didnt understand, let alone were able to read, the native language so this was the easiest way for them to exercise control over the natives. The organising structures were ofcourse different for the Inca's (South America).
From the start of the 18th century the Bourbons came to power in Spain. They implemented all kinds of laws and rules to counter corruption.
That's about all I can think of right now. It's probably not completely satisfactory for your question but I hope you can make something out of it...