If it's on mobile data only, the APN is probably set wrong. If it's on wifi only, either the router is set up wrong or the phone is set up to use the router wrong (like using a static IP address, but it's one the router can't handle). If it's both, it's multiple problems.