To scarper is to leave or leave suddenly, and sometimes its usage is as simple as that. However, it has connotations of running away from rather than towards something, especially fleeing to avoid having to pay for something or to avoid trouble that you’ve essentially brought upon yourself. You’re scarpering when you dine and ditch or when you get caught shoplifting and decide to make a run for it.
Scarper’s etymology, from The Phrase Finder:
From the Italian ‘scappare’ - to escape. This has been in use since the 17th century. Swell’s Night Guide, 1846 includes the quotation: “He must hook it before 'day-light does appear’, and then scarper by the back door.”
The word was adopted into the 'language’ Polari and appeared as such in the now archaic phrase 'scarper the letty’. Letty is Polari for bed or lodgings.
Polari is a form of cant slang. Cant slang is a slang language used by a particular group or subculture that serves the purpose of allowing you to identify fellow members and keep non-members in the dark as to what you’re talking about. Polari was used by British theater, circus, fair and sex workers, homosexuals and criminals. The language went mainstream in the 1960s, thanks to it being used on the popular radio program Round the House.