How to restore and accidentally erased Iphone?

Was trying to download music on an iphone 5c that had never previously been plugged into the computer. It needed new software so after downloading it I tried to sync the phone. It somehow replaced all the data on the phone with the data of a different device. How do we get the phone back to how it was before without restoring it to factory settings?

If you had your iphone backed up to icloud, then just reset your phone and when it asks, select "restore from iCloud backup." If you didn't have it backed up to icloud, then it's probably lost, but you can go to there website to talk with someone or you can go to their store.

I hate to be the bearer of bad news, but your stuff is gone forever. You can't get it back.