Complex sentence: The Spanish tried to board and take over the ship but, whenever they were about to board, Cochrane pulled away briefly and fired on the concentrated boarding parties with his ship's guns.
Split into simpler sentences: The Spanish tried to board and take over the ship. Whenever the Spanish were about to board, Cochrane pulled away briefly and fired on the concentrated boarding parties with his ship's guns.