A vagrant is a person in a situation of poverty, who wanders from place to place without a home or regular employment or income. Many towns in the Developed World have shelters for vagrants. Common terminology is a tramp or a 'gentleman of the road'.
Vagrancy was a crime in some European countries, but most of these laws have been abandoned. Laws against vagrancy in the United States have partly been invalidated as violative of the due process clauses of the U.S. Constitution. However, the FBI report on crime in the United States for 2005 lists 24,359 vagrancy violations. In legal terminology, a person with a source of income is not a vagrant, even if he/she is homeless.
In the fairy tales of medieval Europe, beggars cast curses on anyone who insulted the beggar, or who were stingy with the money they gave a beggar. Witches would beg door-to-door for "milk, yeast, drink, pottage" in England.  In some East Asian countries, vagrants are still revered and feared, believed to possess semi-religious spiritual powers.
In the 16th and 17th century in England, a vagrant was a person who could work, but preferred not to (or could not find employment, so took to the road in order to do so), or one who begs for a living. Vagrancy was illegal, punishable by branding, whipping, conscription into the military, or at times penal transportation to penal colonies. Vagrants were different from impotent poor, who were unable to support themselves because of advanced age or sickness. However, the English laws usually did not distinguish between the impotent poor and the criminals, so both received the same harsh punishments. The Poor Law was the system for the provision of social security in operation in England and Wales from the 16th century until the establishment of the Welfare State in the 20th century.
In colonial America, if a person wandered into a town and did not find work, he/she was told to leave town or be prosecuted. In the U.S., vagrancy laws were vague and covered a wide range of activities and crimes associated with vagrants, such as loitering, prostitution, drunkenness, and associating with known criminals. Under the vagrancy laws, police arrested people who were suspected of crime, but who had not committed a crime. Eventually, punishments were changed to a fine, or several months in jail.
After the U.S. Civil War, the South passed Black Codes, laws that tried to control freed black slaves. Vagrancy laws were included in these codes. Homeless unemployed black Americans were arrested and fined as vagrants. Usually, the person could not afford the fine, and so was sent to county labor or hired out to a private employer.
In the U.S. of the 1960s, vagrancy laws were found to be too broad and vague, and in violation of the due process requirements of the Fourteenth Amendment to the U.S. Constitution, as citizens were not informed of which behaviors were illegal. Police had too much power in deciding whether or not to arrest someone. Vagrancy laws could no longer violate Freedom of Speech, such as when police use them against political demonstrators and unpopular groups. U.S. vagrancy laws became clearer, narrower, and more defined. Since then, the status of being a vagrant is punished by the vagrancy laws, while other actions are punished under other laws.
In the U.S., some local officials encourage vagrants to move away instead of arresting them. The word vagrant has been replaced by homeless person. Prosecutions for vagrancy are rare, being replaced by prosecutions for specific offenses such as loitering. England eventually changed its poor laws, and today vagrancy is legal, while crimes are punished separately.