Technically, the moment you write something it’s copyrighted. There are formalities you can go through (which allow you to claim certain statutory damages, in the event of a copyright infringement case) but you don’t have to worry about them at this point.
Agents are good, but I worry that many young authors spend too much time trying to get agents. Agents are much more interested in you if you’ve already been published, and most of them aren’t interested in selling short stories, so selling short stories to magazines and suchlike places tends to be something you do without an agent. (Just make sure you aren’t selling anything other than ‘First World Serial Rights’, and that if they do not publish it within a reasonable period of time you get the rights back.)