A work permit is simply a document that allows a person to legally work in a country. Many nations restrict immigration in their countries by restricting employment. They limit employment to citizens and non-citizens who are legally authorized to work by issuing work permits to economic migrants.
A person entering a country on a tourist visa is usually not allowed to seek legal employment and may be deported as well barred from ever returning if discovered to be working.
Work permits are usually very difficult to get. Some countries base awarding them on a points system, where a person is scored on their skills and education. If they meet the minimum requirements they are given a work permit. Countries such as Australia, New Zealand, Canada and now the United Kingdom operate UK points based immigration systems. Some countries like the USA award work permits, Green Cards, based on a lottery.
Usually a work permit is given with an entry visa that allows a person to settle for a set amount of time, which can usually later be renewed.