I am interested in how they fared against each other, mostly from tactical aspect and how succesful were the tactics of each side against the other. If you know of any battles where they fought please let me know.
Probably the most famous battle where regular Spanish infantry faced Janissaries was the naval battle of Lepanto, fought near the gulf of Corinth in the Ionian Sea. The tactical and strategic aspects of galley warfare in the Mediterranean were quite a bit different from land warfare, so just keep that in mind.
Before our modern conceptions of training (creating skilled manpower by investing in teaching unfamiliar skills to random Joes), warring powers relied on their societies to generate skilled manpower of their own accord. Turkish archers learned to shoot a bow from childhood because their culture considered it a valuable skill; Sicilian sailors learned to shoot a musket from their ships by having worked as sailors for years or even decades. This process produced very skilled manpower, but it's a brittle system, unable to deal with sudden shocks. The battle of Djerba off North Africa cut deeply into Spain's pool of skilled deck fighters. As a result, the Spanish resorted to embarking the regular infantry of the tercios on their galleys to make up for this shortage.
Now, people often describe fighting on ships as a land battle on the sea, which I have to take issue with. Even in the relatively gentle Mediterranean, fighting on a platform that's constantly shifting in the waves -up and down, rolling forward and back and left and right- is quite different than on firm ground. Spanish infantry were some of the best in the world for dry land, but could only be a substitute for specialist, highly experienced sailor fighters.
Spanish infantry -which at the time included Italians, Sicilians, Sardinians, Spaniards, and Germans- made up a majority of the fighting men at Lepanto, at about 12,000 out of 20,000 scapoli. Many were embarked on the allied Venetian ships, as Venice had chronic manpower shortages that left them below the 60 fighting men per galley minimum the Holy League had established at 40 deck fighters per galley. Thanks to this measure, this was thus brought up to 120; Spanish galleys had a minimum of 150, hile the Neapolitan contingent fighting for the Spanish had 180 each, of which 150 were Spanish infantry.
General galley tactics of the 16th century centered around boarding actions. Being able to capture enemy vessels, instead of just destroying them outright, mitigated the great financial investment involved in maintaining galley fleets. Moreover, if a galley tried to sink its enemy through fire alone, an enemy vessel could often close the gap before they got off a second volley, and delivery a volley of their own at 'clothing burning' range. In general, it was much better to board than be boarded.
Armed with a small battery of cannons at the bow and a projecting spur to ride over the enemy hull, a galley would row towards its target, unleash a single massed volley at close range, before sending a boarding party to storm the enemy vessel. Attacking from the flank, where the enemy could not bring their own artillery to bear and would have difficulty employing their own deck fighters was so much the better.
As a result, breaking enemy formations, thus opening up their flanks to attack, could be a devastating blow to a galley squadron. At Lepanto, the Ottoman tactics centered on trying to envelop the Christian flanks, thus forcing them to face enemies from multiple angles and opening them up to individual flank attacks. On their right, which ran close to shore, they sought to exploit the shallower draft of their vessels to slip through the shallows and swing inward, while on the left, they pulled the Christian right away from the center by threatening to outflank them, then shot the gap between the Christian center and right wing.
By contrast, the Christians sought to break up the Ottoman center, opening up gaps to exploit. To this end, the Venetians employed converted merchant galleys, outfitted with large broadside artillery batteries. Stationed in front of each galley squadron, they would function as a kind of breakwater, killing Turkish crewmen, forcing the Turks to take evasive action, and sinking some ships outright. The Christians had weighted their line towards the center, as Don John's flagship was flanked by several heavily armed 'lantern' galleys, with the squadron as a whole having a disproportionate number of Spanish and Italian galleys; thanks to their large manpower complements and higher freeboard, these galleys had an advantage in head on boarding fights.
To make the most of this, Don John ordered the galleys of the center to saw off the projecting spurs of the ships, to ensure they would not obstruct the artillery's line of fire against the lower Ottoman galleys. This would allow them to hold their fire until the last second, and guarantee maximum execution. When Don John's flagship Real smashed into Ali Pasha's flagship Sultana, the artillery volley did great damage to the 300 Janissaries embarked on the ship. The two admirals had deliberately sought out each other, each firing a single shot from beyond effective range to signal their position to the enemy.
The boarding fight was ferocious. The Christians had maintained their line, while the Venetian merchant galleys had left the Turks in disarray. The fighting between the flagships swung back and forth; ships from the reserves shuttled more men onto the sterns of their respective ships, while others wedged their way into the melee to take part of their own accord. Since their enemies fought in boots, while the Turks fought barefoot, the Turks greased the decks of their ships with oil, and erected barricades around the mast of their ships to impede Christian progress. Don John led several assaults, which twice reached the mast of the Sultana, until the banner of the Holy League was raised over the Sultana, and Ali Pasha's head spit on a pike. The morale of the Ottoman center disintegrated. Though there was still fighting to be done on the Christian right, the battle was won by now.
As a comic coda, the Janissaries of many ships, refusing to surrender, expended all their ammunition. When they ran out, they still refused to surrender, and they began pelting their Christian assailants with lemons and oranges from the ship's stores. Laughing hysterically amidst the carnage, the Christians picked them up and threw them back.
I highly recommend, among others,
Gunpowder and Galleys by John F. Guilmartin
Empires of the Sea: The Siege of Malta, the Battle of Lepanto, and the Contest for the Center of the World by Roger Crowley
The Galleys of Lepanto by Jack Beeching
Lepanto: The Greatest Naval Battle of the Renaissance by Angus Konstam