They were Spanish privateer's that's attempted to defend the gold trade from English privateer's throughout the golden age of piracy and before. Most of their actions were constrained to the West Indies. It is worth noting that most English historical records simply refers to them as Privateer's or Spanish galleons, while the name Guarda Costas seems to appear in literature written after the act. I am not sure if that is due to the uneducated nature of most crewmen of the era, or if it is merely a romanticised term in later literature such as 'Lady Good-for-Nothing' (Arthur Quiller Couch, 1910). I am also unsure as to whether the Spanish government refered to them as Guarda-Costas or not.
Sorry for the horrific spelling, my Dyslexias playing up, and spell check is being useless. I tried my best to ensure it's a high quality reply.