As stated above, it's a non-gender-specific honorific, relatively formal. Just like Mr/Mrs/Miss/Ms. It's also not used to refer to oneself, I would never call myself Koz-san for example, but I might be introduced to you as such.

Usually such honorifics were used to denote relative social standing. -sama was used if the person was of a higher standing (although not really in use today), -kun to someone junior, and -chan for a young boy/girl or as a term of endearment.

Personally, if not in Japan, I find the use of -san a little overzealous in the let's-make-everything-as-Japanese-as-possible department. I would therefore call everyone -kun or -chan, including senior grades. Particularly senior grades!