On Grid solar system in other words means Grid Tie or Grid connected.
By Grid we understand public generation, transmission and distribution system which is a part of our landscape as we can see poles and power lines everywhere.
Every country has his own electrical system which consist many generation points and many consumers. Most of the generated energy is being consumed instantly as public storage systems (mostly water uphill pumping stations) can take over only small amount of energy. Energy in public grid has frequency of 50Hz what means that your 230V in the socket is changing polarity 100 times per second!
Tricky part is that every generator in the system (multi MW steam generator in power plant or your small solar inverter) has to change that polarity in exactly same moment – this is called synchronization. Modern grid tie inverters have no problems with synchronizing to grid frequency but it can take from few seconds to few minutes to connect. If you part of the system, you need to play with system rules, and every country has his own rules, called Grid Codes.
In off grid system you are owner of energy generation and distribution.
You are not connected with public grid and your inverter will blow up if you try to do it. Your off grid inverter is delivering power with same as public grid frequency and voltage but it is not synchronized to it. You can build micro grid based on your off grid inverter (or better bi-directional inverter or inverter charger) and connect grid tie inverters there too! What is interesting you do not need to comply with grid codes or other rules and very often in rural areas your micro grid can deliver power with better quality than public grid.
If you grid connected you can exchange energy with public grid (export for free or sell energy there if allowed) and if you off grid and have excess energy you need to store it in batteries. Being grid connected also means that you have no system if grid is not present – grid tie inverter is not working without presence of grid and even more, it is not working if grid parameters are outside set grid limits (grid codes).