Have you paid your cell phone bill? Not working unless near WiFi indicates you're not getting cellular data. We don't have much more to go on from what you've told us. Have you checked with your carrier? They may be able to help you check settings on the phone to be sure your phone is connecting to the right service.
If you need additional help or have more questions or details to share, please join the site so you can reply in this thread. See
this link for instructions on how to join Android Central.