This is a good question, as it shows how Rainsford fell off the yacht into the water. This action starts the the story.
Here is the context. Rainsford and his friend, Whitney are on a boat and traveling, presumably to hunt. They are also talking about hunting. Whitney retires for the night. Rainsford is on the boat smoking his pipe. As he is doing this, he hears three shots. He is convinced that these are shots; he is probably right.
At this point, Rainsford goes to investigate. He goes towards the rail of the yacht. Here is where it gets odd. Rainsford not only leans on the rail but also stands on it. He loses his balance and falls into the water. Here is what the text says:
An abrupt sound startled him. Off to the right he heard it, and his ears, expert in such matters, could not be mistaken. Again he heard the sound, and again. Somewhere, off in the blackness, someone had fired a gun three times. Rainsford sprang up and moved quickly to the rail, mystified.