You can plug both in at the same time and be connected to both, but you can only use the Internet from one of them. The computer will prefer the cable.
So if you only have Internet access via one of them then yes you can be connected to both networks. But if both are capable of providing Internet access, then Ubuntu will prefer the cable (Ethernet) network to access the Internet (and not use the Wifi network to access the Internet).
The upside of using two connections that provide Internet access, is that if one is disconnected, you will keep on using the Internet without being affected.
I have asked a similar question on the site before, that you might find useful.