Changing your Apple ID will not cause you to lose contacts. If you don't already have an Apple ID, create one now at id.apple.com. Then, on your iPhone, go to Settings > iCloud, and delete the account. Make sure to choose to 'keep on this iPhone' when prompted.