The Spanish Armada was defeated in 1558 due to a combination of factors:
1) English ships were smaller but better built, manned, and equipped with artillery which gave them an advantage.
2) Harsh weather scattered the Spanish fleet and drove many ships onto rocks near Ireland.
3) Mistakes by the Spanish, including panicking when the English sent fireships toward them and losing formation in the open sea, made their ships vulnerable.