The Lumpenproletariat (directly translated: rag-proletariat) is a term used by Marxists to describe the section of the proletariat that can't find legal work on a regular basis. These may be prostitutes, beggars, or homeless people.
Actually Karl Marx and Frederick Engels jointly invented the term in 1845-1846 as they wrote up their famous second joint work entitled 'The German Ideology'.
There are presently two main branches of how to define lumpenproletariat; (1) there is the modern usage, as given above, and (2) there is the creators' usage, which is more specific and reflects how Marx and Engels formed the concept.
Reduced to its most basic components, Marx and Engels defined the lumpenproletariat as those people within the historical working class who were not proletariat.
The concept lumpenproletariat was their creation in response to a theoretical and practical problem that they had in developing their own unique model of class analysis Their problem could be summed up as having to correctly answer this simple theoretical and practical question: 'Why does a section of the historical working class not behave or interact as any good proletariat should interact? Or how do you account for those in the historical working class who do not interact as good proletariat should interact, say, for example, how do you explain those in the working class who consume far too much alcohol or are just too ambitious to be good proletariat?'. Their theoretical and practical answer to these problems were quite simple: 'A certain section of the historical working class are just not historical proletariat but are historical lumpenproletariat'.
To Marx and Engels, the term proletariat is not equal in meaning to the term working class. To them, the term proletariat is a historical or diachronic concept while the term working class is an ahistorical or synchronic concept. Like the historical concept proletariat, the concept lumpenproletariat is also an historical concept.
Marx and Engels liked the proletariat because they had a good sense of class consciousness, while the lumpenproletariat lacked a sense of class consciousness. Rather, the lumpenproletariat were essentially obedient to the wishes of the bourgeoisie (middle class) and the aristocracy. While a constant threat to the safety of the middle-class individuals, the lumpenproletariat existed outside the wage-labor system, and individuals of the lumpenproletariat often depended on the bourgeoisie and the aristocracy for their day-to-day existence. Hence the lumpenproletariat had no real motive for participating in revolution, and an interest in preserving the current class structure. In that sense, Marx and Engels saw the lumpenproletariat as a counter-revolutionary force.
Later, in their post-1845-1846 economic writings, Marx and Engels began to think of the proletariat as mostly originating from having to do productive labour while the lumpenproletariat tended to mostly originate from doing unproductive labour (See Adam Smith's 1776 publication 'The Wealth Of Nations' for the work on defining productive labour and unproductive labour on which Marx and Engels rely).
The more colloquial use of the term to mean the chronically unemployed "dangerous class" whose members refuse to participate in the economic system, go to the polls to vote for handouts, and generally will not help themselves through legitimate means even when offered assistance has some overlap with Marx's and Engels' usage, but lacks the specific meaning that Marx's usage had in the context of his theory of class-consciousness and materialist theory of history.