Spain got in the fight at the vehement request of the Papacy -- and because Muslim corsairs were raiding their coastline with substantial vigor (including the Barbarossa twins). Genoa, too, was goaded in to fighting, but they were very reluctant to put their ships on the line as their ships tended to be individual/family owned and there was a built in disdain for the Venetians that cautioned them against committing resources to help.
There were a number of massive naval engagements, including the Battle of Lepanto(http://en.wikipedia.org/wiki/Battle_of_Lepanto_(1571)) which was one of the single largest naval battles ever fought.
Much of the riches that Spain gleaned from the Americas was funneled in to building and maintaining a massive fleet to fight the Ottomans with.
So, yes, the proximate causes were the Ottomans and other problems, but a significant portion of the root cause can be attributed to 1) the discovery of the new world, and 2) new sea routes around Africa to the spice islands and Asia.
At least that's what I've gleaned from what I've read. Naturally, human affairs are often quite complex, and so there are a lot of different things that contribute.