There are two issues:
1) Legal: What is required to meet your local utility, and state regulations. Often this means either an automated, or interlocked gen-tran switch to ensure that no power is put onto the grid when it is down. Other jurisdictions outlaw it altogether.
2) Physical (electrical): Many inverter create the AC signal by essentially copying the signal from the grid. Without that grid signal it can't make AC. Other inverters create their own AC signal (either pure sine wave, or some approximation). These can make AC power for you, even if the grid is down.
'Islanding' is the isolating of some section of the grid, such that workers in another section can't be harmed. This can be done on an individual user level, or a larger section of the grid (often called a micro-grid).
Thank you kindly.