Your right as an EU citizen to stay in an EU country
The European Union treaties give certain rights to EU citizens throughout the EU. Essentially, they confer the right to study, look for work and work in any EU country.
These treaties have now been extended to the European Economic Area which, after the latest expansion in the EU now covers the EU and Norway, Iceland and Liechtenstein. It is possible that some of the Eastern European countries that are negotiating to join the EU may gain EEA status first but that it is not certain.
They go on to explain how those rights are to be granted and what the limits are. I'm not an expert on the provisions as they affect studying but I will comment on those that affect work.
First of all, to consider the right to look for work. If you spend up to three months in any EU country, you can claim to be looking for work and you will be allowed to stay simply as a result of making that claim. You may stay for longer provided that you can demonstrate that you are actually looking for work and that you have a reasonable expectation of finding work in a short period of time.
As far as work itself goes, if you can find a job you can stay for as long as you can keep it.
These rights are extended so that you are allowed to bring your dependants with you. Your dependants are also allowed to work. Your dependants certainly include your spouse and your children or step children. At the discretion of your host country, they may include elderly parents or a partner who is not your spouse. The latter would only be the case if some reason prevented you from marrying.
The main restriction on the rights is that you or your dependants may be excluded if your presence is a threat to good public order or if your dependants canno be adequatedly housed and provided for without recourse to public funds. Also, a man may not bring in more than one wife at one time!
Switzerland recently agreed to sign up for these same freedom of movement rules. However, they will not come into force immediately and even when they do, the Swiss have reserved the right to close their borders again if they suffer from substantial immigration.