I've been using Ubuntu 14.04 LTS for almost one and half years now. This problem hasn't ever happened before. The bar at the top shows that I'm connected to WiFi/ethernet, but when I try to connect to, say Google, I'm unable to get to it. Chrome says "This site can't be reached".
EDIT_0 (some more info, don't know if this is useful; I already mentioned this in a comment to one of the answers): I'm using a dual-boot machine, running Windows 10 and Ubuntu 14.04. Both wired and wireless network connections work absolutely fine on Windows. Also, I've tried two different mobile hotspots, with the same result, i.e. works in Windows but not in Ubuntu.
EDIT: the diagnostics output can be found here (https://pastebin.com/2FSvfwKq)
EDIT2: Diagnostics run as suggested by @David Foerster. Results are as follows [pastebin link is https://pastebin.com/zGseXr1d ]:
jarvis@jarvis-Inspiron-5558:~$ ping -c4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics
---4 packets transmitted, 0 received, 100% packet loss, time 3024ms
jarvis@jarvis-Inspiron-5558:~$ ping6 -c4 2001:4860:4860::8888
connect: Network is unreachable
jarvis@jarvis-Inspiron-5558:~$ host google.com
;; connection timed out; no servers could be reached
ping -c4 8.8.8.8
,ping6 -c4 2001:4860:4860::8888
, andhost google.com
and edit your question to include their output? Thanks.