A shipmate is a mate on one's own ship (i.e., a member of the same ship).
Usage in Navies
In the navies of English-speaking nations (and the United States Coast Guard), the term "shipmate" is used among sailors as a generic moniker. It is used in the third person by a member of a ship's crew to describe another member, or in the second person when referring to any other Naval service member.
In the United States Navy, "shipmate" is a term used by anyone in the Navy to reference anyone else in the Navy. It can be used with a range of connotations—most often as an expression of camaraderie, but also as a respectful way to address other crew members whose rank or naval rating is not clear. It can also be used in a derogatory manner. It is used both on land and at sea and is used among Naval service members whether or not they are members of the same ship. The term is used so abundantly in the U.S. Navy that the inflection, context, and tone of the speaker can connote more meaning than the term itself.
In the U.S. Navy, recruits were indoctrinated with heavy use of the term upon beginning training at Recruit Training Command (or "boot camp"), where they used the term abundantly to refer to their peers in all but the least formal settings, in scenarios when referencing another person by name or title would be otherwise unnecessary. For example, a recruit in the chow line would add "shipmate" after identifying each item of food he or she wishes fellow recruits to place on his or her tray ("potatoes, Shipmate!", "green beans, Shipmate!", "bread, Shipmate!" etc.) The term was almost never used by superiors to refer to inferiors during recruit training, except ironically or in a derogatory tone. As the hierarchical distinctions in recruit training fade once the recruit joins the regular Navy, so do the above distinctions. It is not uncommon to hear an Admiral or Captain refer to his lowest subordinates as "shipmate" in order to express camaraderie. Inversely, peers may refer to one another as "shipwreck" or use a vocal inflection that connotes derogation, usually with an accent on the "-mate."
The term is often used in a follow-on training status such as "A" School from superiors to their subordinates to point out deficiencies, usually when rank of the subordinate is not easily identified. An example would be "Hey shipmate! Fix your uniform!" The use of the term in this context would be similar to a division commander referring to a recruit as "Recruit".
Although the term is not commonly used outside maritime scenarios, it is often used by Navy veterans toward one another as a means to reminisce or bond about shared experience.
Usage in literature
Herman Melville's Moby-Dick, a popular maritime novel, is laced with the term, although the narrator Ishmael seldom uses the word: "This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping partner one, so far as this narrative is concerned), I will here venture upon a little description of him."
Usage in contemporary maritime dialogue
One might refer to a fellow crew member by saying, "He and I were shipmates before reporting for duty here in Norfolk." The word is used in this sense in the old song "Don't Forget Your Old Shipmates".
When getting the attention of a fellow sailor, one might simply call out "Shipmate!" or "Hey, shipmate!"
When speaking to a group or crowd of sailors, i.e. "My fellow shipmates..."