The engine must obviously be equipped for automatic start & run.
Usually, the start will be initiated by the loss of supply voltage from the normal source. Run-up of the genset will be automatic, at which point it can be connected to the load after the normal source is isolated, usually by operation of a circuit breaker.
Automatic transfer back to the normal supply also needs to be considered.
If the station is unmanned, there will probably be some provision for remote monitoring &/or alarm when the geneset is running.
I suggest that you get professional engineering help in setting up a system such as this, as there are a lot of factors involved.