Cuñado, Spanish for “brother-in-law,” comes from the Latin cognatus, from which we get the near-identical English cognate. How can two words so similar mean something so different?
The Latin root cognatus itself came from the roots com– (meaning “together”) and gnasci (meaning “to be born”); thus, literally, “born together.” So, two words that are cognates are — etymologically-speaking — words that are born together. And brothers-in-law are two men who are not brothers but were, in effect at least, born together as well.
Note also that this is an example of the pattern whereby Latin words with a -gn- generally became an ñ in Spanish. Thus the c-gn-t of cognate maps to the c-ñ-d of cuñado.