There are some legal consequences to certain kinds of speech under various state and federal anti-discrimination laws, and this has passed muster under the United States Constitution and state constitutions. Also, some states now have enhanced sentencing for hate crimes, which means that it is likely some speech is involved. I don't know if any of those has been challenged under the First Amendment.
For the most part, anti-discrimination statutes do not have criminal consequences and usually involve what is called a "make whole" remedy, meaning the law is meant to put the victim in the position he or she would have been in had the unlawful discrimination not happened. Using the "n" word to a co-worker would be one example of a violation of such a statute. Consequences in a case like this could very well be losing one's job.
Most campus policies are pretty much in line with anti-discrimination statutes, so are not likely to be challenged. Also bear in mind that the First Amendment is meant to stop the government from repressing speech. So a private university is not subject to the First Amendment at all. Similarly a non-governmental workplace is not subject to the First Amendment, and a company is perfectly within its rights to tell its employees what they can and cannot say.
The legitimacy of free speech restrictions varies from nation to nation. In the U.S., freedom of speech is not absolute. Defamation of character, libelous statements, statements that endanger the general public, and threats of physical harm are not protected under the free speech clause of the U.S. Constitution. These restrictions protect individuals' safety. However, in the U.S., hate speech is legal and protected under the free speech clause. If speech incites immediate violence then it may not be constitutionally protected, but generally speaking individuals are free to make racist, sexist or otherwise disparaging remarks about any individual or group without legal consequence. Private campuses can restrict hate speech, public universities cannot. Other nations have different policies. For example, in Denmark, France, and parts of Australia, hate speech is illegal and certain groups are protected from it by law.