Nonequilibrium steady states and phase transitions in driven diffusive systems