Re: Thanks pdr
You own the copyright for anything you write the moment it leaves your brain and appears on paper, and continue to own it unless you actively assign it elsewhere. The problem comes with proving you wrote it and when.
The best way of doing that, if you're worried about piracy, is to mail a copy to yourself, preferably by registered post. (That's what it's called in the UK, don't know if it's the same elsewhere. Where you pay extra and get a receipt.) Then leave it sealed, and that would be legal proof you were in possession of the work at that date. Anyone challenging you would have to prove they had it earlier (which presumably they'd be unable to do). Alternatively, you could lodge it with a bank or solicitor, but that would probably be more expensive.
In practice, there's not usually much of a problem with SF/fantasy magazines. It's supposed to be a lot more dodgy if you're writing for film or TV. Or if you happen to be J. K. Rowling or someone, of course.