That depends on the activity you would like to carry out. If you will work for a company you can request a visa as an employee within the 10% allowed, or as a specialized worker within the 15% allowed.
If you have a degree in a profession that non-Panamanians can exercise, you can request a professional work permit. Similarly, there are permits for investors, for those who purchase real estate, or you can open a time deposit account with a Panama bank.
Depending on your nationality, there is a special permit for certain countries such as Europe, United States of America, Canada, Brazil, Mexico, Argentina, Costa Rica, among others.