How common is it for a professor to require students to work for him? I'm in a computer science master's program in a university in asia.  It's a three-year program, and halfway through our first year, our professor told us to come work for him at his company during our free time.  I thought it would be a good way to get some experience so I went along with it.  He gave us a little bit of pay but it was irregular and we never knew how much we would get. 

After a while, he said we should come work for him at his company everyday unless we had class. My classmates and I didn't want to go anymore, because the work was only vaguely research-related and completely unrelated to our desired thesis topics.  At this point, we were all uncertain if whether what we were doing was just research or actually a job. There was no contract or anything.  One classmate said he wanted to stay on campus to focus on his research, and our professor belittled his research ideas and told him that working for him would be much more valuable.

At the end of my first year, I got a great offer for a part-time internship in another company. When I told my professor that I wouldn't be coming to his company anymore, he was not pleased.  He told me he wouldn't be able to help much with my thesis.  Eventually he gave me permission but it's most likely because I'm American, and I get treated slightly better than my local classmates. 

When another classmate tried to leave, our professor gave him a very difficult software problem and said that if this student could solve it, then he could leave the company.  The assignment was in an area that this student has no prior experience in, so he was unable to solve it and was too afraid to try to leave again.

From what I've heard, this is a common situation in our department and in other universities in the area.  Since I've never done graduate school in the U.S. or anywhere else, I don't know if this is accepted behavior or not.  I want to inform my classmates of the choices they have. So, on their behalf I want to ask:

What kind of position is this? Would this be considered an internship, research assistance, or just research?

In the global academic world, do professors have the authority to require their students to work for them? Should my classmates have the option to do something else?

Related:
A while ago I read this question about masters students working for a professor's profit-making company.  I can fully understand the value of turning research into commercial benefits. I have no problem with this part.  However, in this answer, someone asks if the students feel coerced into working with him. In this situation, I believe the answer is a yes, and basically I'm wondering what to do about it.
To quote JeffE: Run, don't walk.

Remember that first and foremost, you are a student. The purpose of being a student is to receive an education - if you wanted to work full-time at a company, you would not be paying for graduate school.


  ...halfway through our first year, our professor told us to come work for him at his company during our free time...He gave us a little bit of pay but it was irregular and we never knew how much we would get.


Working for a company part-time as a graduate student isn't unheard of; not being properly compensated for your time, however, is likely illegal. That doesn't necessarily mean getting a salary, but it does mean getting more than just "experience".


  After a while, he said we should come work for him at his company everyday unless we had class. My classmates and I didn't want to go anymore, because the work was only vaguely research-related and completely unrelated to our desired thesis topics....There was no contract or anything.


A bunch of red flags here. First, if the work you are doing is not interesting to you, find a new advisor. Easier said than done perhaps, but the advisor-advisee relationship is one of the most important of graduate school - indeed, it's a significant part of what separates graduate studies from undergraduate studies.

Next, being asked to work for a company without any form of contract is indentured servitude at best...and quite possibly much, much worse. Think of it this way: would you ever work for a company like this if you weren't in graduate school right now? (Hint: the answer should be a resounding NO.)


  One classmate said he wanted to stay on campus to focus on his research, and our professor belittled his research ideas...


Again, advisor-advisee relationship. These are not traits of a good advisor.


  When another classmate tried to leave, our professor gave him a very difficult software problem and said that if this student could solve it, then he could leave the company. The assignment was in an area that this student has no prior experience in, so he was unable to solve it and was too afraid to try to leave again.


Yes, in graduate school you are asked to tackle tough problems. And yes, often you have little experience or background in that area. But the whole point of graduate studies is to grow your knowledge of a particular field that you find interesting - and your advisor is supposed to help you do that. This does not sound like helping.

So, to answer your questions:


  What kind of position is this? Would this be considered an internship, research assistance, or just research?


I'm going to go with "abuse". Get out as quickly as possible.


  In the global academic world, do professors have the authority to require their students to work for them? Should my classmates have the option to do something else?


No they do not (at least not in that capacity), and yes they should (unless graduate school in Asia works differently, the most you can be held accountable for is tuition and fees - beyond that, what you all do is entirely up to you). But the individual you are working with right now is acting highly unethically and possibly (likely?) illegally, and you and your classmates have nothing to gain by continuing this relationship.