If you are in the United States, as lamar has already said, you automatically own copyright as the author of your work from the instant you create the work. Also as lamar said, registering your copyright with the US Library of Congress costs $35. The advantage of registering your the copyright is that it makes it much easier to defend in the case of intellectual property disputes.
If you are outside of the United States, you are subject to the laws of whatever country you work in.
As MPPlantOfficial suggested, preventing theft of intellectual property is up to you, and is not always as easy as sending a "cease and desist" letter. If you are concerned, I recommend consulting an attorney who specializes in intellectual property and copyrights.
These are the basics from the USPTO website. Note that copyrights fall under the Library of Congress, not the USPTO.
https://www.uspto.gov/learning-and-resources/ip-policy/copyright/copyright-basics#heading-2
Here are the instructions for registering with the US Copyright Office:
https://www.copyright.gov/fls/sl35.pdf