Under the Berne Convention, which pretty much the whole modern world is signatory to, anything you write is automatically copyrighted to you, with no extra steps needed.
To expand on this, you automatically have the copyright long as you can
prove you created the work, which usually is trivial if you have all the intermediate steps (project files, beta versions, art sketches, design documents).
So always keep a backup of the stuff, just in case someone decides to challenge your copyright or something.
I'm not sure, but I think you can take an extra step to make the copyright more official by registering the property. Not sure how it works exactly.
And it bears repeating, you can copyright content, not ideas. Don't make a fuss when you publish your sewing/spelunking simulator and someone comes around an publishes a different game with the same mechanic (lots of people misunderstand this)