The expression "message in a bottle" literally comes from the practice of placing an important but untargeted letter inside a (usually) glass bottle, sealing it, and allowing ocean currents to carry it away. There are indications that ancient Greek scientists used the message in a bottle to study the general flow of oceans. Early militaries also used bottles to relay messages to distant troops, although this method did have a few tactical drawbacks. If the enemy discovered the message first, vital secrets might have been revealed. This predicament lead Queen Elizabeth I of England to appoint an official Opener of Ocean Bottles.
Many people associate a message in a bottle with shipwrecked souls living on a deserted island with little hope of discovery. The idea would be to create a detailed description of the survivors, their last known location and landmarks found on the island. Once the sealed bottle has been released, the ocean currents should eventually carry it to an inhabited coastline. The finder would discover the note and notify the proper authorities for a rescue attempt. Unfortunately, the bottle and its contents could just as easily become trapped in ocean debris or swamped by passing ships, or make landfall in an isolated area. Nevertheless, it does provide some form of hope for eventual rescue. Hundreds of messages in hundreds bottles, however, might be an even better tack to consider.
The truth is that it is far more likely for a message in a bottle to be sent purely as a social experiment. Some coastal citizens will place a personal greeting complete with contact information in a bottle and send it out to see how far it will go. Those who find such a messages are often urged to send back a detailed report on how and where it was discovered. Others may become pen pals with the original sender, or add their own messages and send the bottle back out into the water. An entire class of students could coordinate its own program and chart the results throughout the years.
Scientists also use a more sophisticated message in a bottle to study ocean currents and waves. These containers hold special cards asking finders to document location and time of discovery. Some high-tech systems may also contain a small Global Positioning transponder for remote location. Even if humans never discover these containers, the information can still be retrieved.
The term has recently changed from the literal to the figurative. It is often used to describe a business or social communication with no specific recipient. A computer software engineer in Iowa may send out a 'message in a bottle' aimed towards Microsoft executives, for example. It wouldn't be sent directly to Bill Gates in an envelope, but rather published as a general blog entry or on an open forum for software engineers. Another person might put out a message in a singles forum to attract potential romantic partners. The point of these exercises would be to allow the messages to circulate naturally, hoping that the right people will eventually find them and respond.