Writing and Copyright Laws
Whether you write online or off, your work is governed by copyright laws. Copyright laws protect you and protect other writers, making sure that the proper credit goes to the proper person. When you "copyright" something, no one can use it for anything but you. The law says that you can't copyright ideas, but you can copyright anything you've recorded by writing it down. In other words, no one can plagiarize your work by copying it exactly (or closely copying it, even if the exact words aren't used).
Copyright laws give you protection from plagiarism as soon as your work is created, even if you haven't paid for official protection and even if you haven't put a notice on the work that copyright laws protect it.
The way you make money in freelance writing, however, is by selling your rights. When you publish a book, you retain your rights and therefore are paid royalties whenever you sell a copy, but when someone purchases an article from you, they're buying the right to publish that piece for their own profit, without paying you royalties. So, when you sell something you've written, it is important to understand exactly what rights you are selling.
Many magazines want to buy first North American rights. That means that they have the right to print the article first, and they don't have to pay your royalties to do so. After the article is printed, after the time period specified, the rights revert back to you, so you can sell the reprint rights to another person.
You can also sell usage rights, which people do in the form of PLR packages.
When working with a client online, it is also common to sell full rights. When someone purchases full rights, they aren't guaranteeing that you'll be given a byline (named credit). Many times, you'll be hired as a ghostwriter, and when you sell your rights, you can't use it again - if you do so, you are the one violating copyright laws. You're also violating copyright laws if you copy another person's work and try to sell it online as an original creation.
Webmasters routinely have to combat people stealing their work, since it is easy to copy and paste content to another site. It can be a struggle to protect your work online, and many writers choose to work with lawyers when dealing with copyright issues. You can read more about copyright laws here.