Considering that the conquistadores were often semi-private adventurers with little to no prior military service, where and how would they have learned how to fight?
Where and how would they have acquired the sword / crossbow / arquebus / martial skills they would need when it came time to fight the outraged native warriors?
How would, say, a desperate Extremaduran peasant or a Sevillian immigrant come to the New World or to the Philippines have learned how to fight with arms and armour?
On the job training. Few if any would have had formal martial training. Some of the wealthier ones might have had some if they could have paid for it, but martial training was the preserve of the nobility and few conquistadors were noble. Those that came from the petty nobility (hidalguia) could have had some training as youths serving as pages or servants (criados).
Some older men might have learned to use weapons during the campaigns of reconquest. Later others might have learned while fighting in European conflicts during the early-mid sixteenth century. Some might have learned while serving in the citizen militias of Iberian cities.
Most men probably bought a sword before going to the Americas, or once there. Swords were controlled sumptuary goods and could only be carried publicly by the nobility in Castile and Aragon. Once in the Americas they might have received some training by more veteran members or simply by wielding the weapons in the field.
The most useful weapon was the steel sword, it was more durable, lighter, and longer than most similar indigenous weapons and probably was the primary reason Spaniards were able to hold their own in a melee battle and suffer such low rates of injury and death. (See Matthew Restall's Seven Myths of the Spanish Conquest).
Also, peasants did not become conquistadors. Conquistadors paid their own way, peasants did not have the disposable income for such a venture. Most conquistadors came from the middling classes not the peasantry or the nobility.
The difficulty with answering this is that many conquistadors show up in the historical record specifically because of their part in the various conquests throughout the Americas, with their pasts and even their future endeavors basically unrecorded. We do have more biographical information on some men like Cortés, Pizarro, and some of their captains, but that is only on account them becoming notable through their actions, rather than any intrinsic factor of their lives. There's an interesting book by Hugh Thomas, The Who's Who of Conquistadors which aims to have at least some sort of biography for all the individuals who took part of campaigns of conquest and exploration. Many entries, however, are simply a sentence or two indicating that so-and-so was born in place X and was noted as being a part of campaign Y, with few other details.
/u/historianLA is absolutely right that the men who traveled to "the Indies" were largely those who could afford to do so, but had neither the wealth nor the connections to climb the socio-economic ranks of Iberia. Gomara, for instance, describes the Cortés family as having "little wealth, but much honor," with long established family roots than nonetheless did not translate into much beyond a "middle class" lifestyle. Bernal Díaz del Castillo was the son the regidor, a town councilman. These were the kind of men that had both the funds and connections to travel to the Americas, as well as the need and ambition to seek their fortunes in what was basically an unexplored alien world.
Another commonality in the families of conquistadors is that almost all had fathers who had fought in the service of some captain in some conflict. Many of the most famous conquistadors were born in the generation after the Reconquista, but many of their fathers had fought in wars in Spain and/or in Italy. This was true of Pizarro and was true of Cortés, as well as Cortés' lieutenant, Pedro de Alvarado, among others. Given the profound impact several centuries of warfare had had on the Iberian pennisula, it is reasonable to expect that these young men were raised with the expectation that they too would participate in conflicts. Cortés, for instance, had set off to join the wars in Italy before, well, dicking about in Spain for a year and then heading to the Caribbean. Raudzens (1995) discusses how consistent warfare in Spain and Italy had the effect of leading to a sort of arms race in both military technology and organization, even before the advent of what could be seen as modern professional armies, which resulted in essentially a militarized society. He quotes a few other authors on the subject in this passage which I think is relevant:
Nor were soldiers in the early sixteenth century recruited from any special social group. Andre Corvisier agrees there was the old noble military class, but all other classes also served. ’Thus in Christian Europe, in the sixteenth and seventeenth centuries at least, society was strongly permeated with a military spirit. Equally so was the state. Specifically for Spain, Elena Lourie argues that the Reconquista experience militarized society from top to bottom and made war the preferred option for both national and personal pursuits of gain; ’it was this prolonged and complex conditioning which made it almost inevitable that, once America had been discovered, it should be a handful of Castilians who would undertake the conquest of the New World.'
The fact of the Reconquista only a generation before, and on-going constant warfare in the Italian peninsula, meant that men of Cortés generation -- who arrived in the Americas without formal training in war -- could also find themselves under the command, or in the company of, older men who had experience fighting in Europe and North Africa, particularly in Spain, Algeria, Morroco, and the almost continuous wars in Italy. Pedrarias Dávila was already an old man and veteran of campaigns in Spain and Algeria when he took command of Panama from Balboa. Diego Velazquez is thought to have fought in Italy before leading the conquest of Cuba. Nicolas de Ovanda, Governor of Hispaniola and family friend to Cortés, was a high ranking member of Spanish military order.
Once in the Americas, these young and inexperienced men often found themselves involved in lesser conflict before going on to the more marquee expeditions they are known for. Cortés took part -- according to his biographer, Gomara -- in the campaign against the Taínos led by Anacaona. Díaz del Castillo, having arrived in the Americas with the aforementioned Pedrarias Dávila, most likely took part in the disastrous Cordoba Expedition to the Yucatán and claimed to have taken part in subsequent Grijalva Expedition. It's important to recognize that while there are a handful of major campaigns which stand out in the Spanish conquest of the Americas, there was almost always low-level and smaller conflicts going on at the same time.
Essentially, these men came from a background which was already highly militaristic, and more often than not had fathers and other close family members who had taken part in conflicts. They then traveled to the Americas where they worked along side older men who had combat experience, while getting firsthand experience through many smaller excursions.