On Grid solar system in other words means Grid Tie or Grid connected.
By the Grid we understand public generation, transmission and distribution system which is part of our everyday life (we can see poles and power lines everywhere).
Every country has his own electrical system which consists 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 a 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 at exactly the 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 do it, connect and start generating. If you are 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 the energy generation and the distribution.
If you are not connected to the public grid, your inverter might blow up if you try to do it. Your off grid inverter is delivering power with the 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 (better bi-directional inverter – inverter charger) and connect grid tie inverters there too! What is interesting you do not need to comply with grid codes or follow other rules. Often, especially in rural areas, your micro grid can deliver energy with better quality than public grid.
If you are connected to the grid you can exchange energy with the public grid (export for free or sell energy there if it is allowed). If you are off grid and have excess energy, you need to store it in batteries. Being grid connected also means that your system is not working if grid is not available (grid tie inverter is not working without presence of grid and even more, it is not working if grid parameters are outside the grid limits (grid codes)).