Normally you will get a 30-days tourist visa at the border when you enter Thailand. This can be extended up to 15 days at the immigration office.
If you plan to stay longer, you should apply for a Tourist Visa at the Thai embassy in your home country. This one can be extended with another 30 days at the immigration office for 1900 baht, thus 90 days in total. You can also try and ask for double entry visa, this means you can enter Thailand two times and stay in Thailand up to 6 months.
If you want to work in Thailand you need a Non Immigrant B Visa plus a Work Permit. It may be easy to obtain in your home country if you have a letter of employment and other documents supporting your visa from your counterpart in Thailand but you may only be granted 3 months.
You are not allowed to work in Thailand without a work permit. Business Visa and work permit is required. You may end up in jail and later be deported from Thailand if you only have Business Visa and do not have a Work Permit (in case you work and do business).
If you are married with a Thai lady/man and can show proof of your marriage, you can obtain a 1-year Non-O Visa.