Sailing on a ship you need to know the ropes, which is the most likely origin for this common expression. Read about it here . Today the phrase indicates needing to know all the methods involved for a task, to have a complete understanding of something.