You can be connected to the normal power grid but also have solar power. There are multiple ways of doing this:
This involves having seperate electrical circuits for solar power and for grid power. Usually this means lighting is provided by solar power. However, you are by no means limited to lighting. The systems just have to be kept separate. The rest is then supplied by grid power.
In this setup you have two electricity meters - one for the grid power entering your house and one for the solar power leaving your house. This often means that your solar setup doesn't need batteries, only panels and an inverter. A power company buys the power you produce. You pay the normal electricity as per usual.
With this setup if you are using less power than you are producing your meter turns backwards. If you are using more power than you are producing your meter turns forwards. As with two meters, this often means that your solar setup doesn't need batteries, only panels and an inverter.
The setup that applies to you will depend on your existing setup (if you have one), your location and how the system works near you and so on.
Unfortunately, it is not as easy as plugging in your solar system into the grid. While the process varies from place to place, you'll generally need a contract with an electricity company (for them to buy your power) and approval of your system. The exception to this is when you have separate grid and solar systems. As you are not connected to the grid you can do pretty much what you want.