This depends on the magazine and its guidelines. Most publications will retain the rights to publish your story after you've been paid but may allow you to publish it elsewhere.
Overall, you should check out each platform's publication policies.