The phrase "avast, ye mateys" is a pirate term used by the captain of a pirate ship to command the ship mates to discontinue whatever activity in which they are engaged. The phrase is also used on navy ships.
The word "avast" comes from the Dutch language and means to stop, cease or halt all activity. It likely has its origins in the Dutch sailing phrase "houd vast," which translates as "hold fast." It appears in documents as a nautical term as far back as the 1600s. In modern vernacular, "avast ye matey" is used to imitate the freewheeling lifestyle of old-fashioned pirates in literature and folk tales.