Easiest way to think of a HSI is as a 'standard' DI that gets given an automatic slight 'nudge' to keep it aligned. The nudge coming from an electronic compass mounted somewhere remote from interference.
Add an automatic fast nudge to get the thing aligned in the first place & a means to disconnect the nudge.
Once disconnected it's very like a standard DI, only you use an electric switch to set alignment instead of a mechanical knob.
Other bells & whistles include an integral VOR display.