This English idiom is used fairly commonly in informal contexts and mainly in spoken language although it can be found in written pieces.
The expression is used to suggest the understanding of how to do something. It is used to express familiarity with how something works and the processes involved in carrying out a job or task.
The expression is said to have nautical derivations as sailors had to learn how the ropes worked before they could set sail. The first recorded usage of the expression can be found in a nautical themed text by Richard H. Dana Jr called Two years before the mast from the year 1840. It reads “the captain, who had been on the coast before and ‘knew the ropes,’ took the steering oar.”
This is not the only suggestion regarding the origins of the expression and another suggestion relates to theatrics and the fact that those who work behind the scenes have to learn how the ropes work in order to operate the curtains. In this way we find an early quote from the year 1850 in J. Timon’s Opera Goer. In this opera the phrase “the belle of two weeks standing, who has learned the ropes,” is used.
An example of the usage of this expression can be found in a famous quote by the American actress Mae West who stated “a dame that knows the ropes isn’t likely to get tied up.”