As Rod says, it must go into the water. I have the folding type that fits into slots screwed to the port side deck about 30cm from the stern, just inside the toe rails. It works well.
Prior to that, I had made a rope ladder with lovely timber steps....... Rope ladders are fine for young, fit teenagers, not for anyone who is unbalanced or heavier than perhaps they should be. Although it does make for a good laugh watching people try to get out of the water on one.....