Copyright applies automatically from when your work is created, and, in most circumstances, lasts for your lifetime plus 50 years.
Under international treaties, copyright also automatically arises in most other countries in the world.
Copyright is a tool to recognise your rights over your work. It doesn't prevent someone else from independently producing the same work.
You can license others under your copyright or sell your copyright to another person.