A Work Visa allows you to legally work in a certain country for a specific period of time.
Most countries require you to have a job offer from that country before you apply for a Work Visa. The Company which has given you the job offer also needs to sponsor your Visa. You may also be required to have a positive Labour Market Test before you apply for the same.
Hence, to get a Work Visa you must first meet the eligibility requirements of the Visa specified by the particular country.