Following a tidal disruption event (TDE), the accretion rate can evolve from quiescent to near-Eddington levels and back over months - years timescales. This provides a unique opportunity to study the formation and evolution of the accretion flow around supermassive black holes (SMBHs). We present two years of multi-wavelength monitoring observations of the TDE AT2018fyk at X-ray, UV, optical and radio wavelengths. We identify three distinct accretion states and two state transitions between them. These appear remarkably similar to the behaviour of stellar-mass black holes in outburst. The X-ray spectral properties show a transition from a soft (thermal-dominated) to a hard (power-law dominated) spectral state around Lbol∼few ×10−2 LEdd, and the strengthening of the corona over time ∼100--200 days after the UV/optical peak. Contemporaneously, the spectral energy distribution (in particular, the UV-to-X-ray spectral slope αox) shows a pronounced softening as the outburst progresses. The X-ray timing properties also show a marked change, initially dominated by variability at long (>day) timescales while a high frequency (∼10−3 Hz) component emerges after the transition into the hard state. At late times (∼500 days after peak), a second accretion state transition occurs, from the hard into the quiescent state, as identified by the sudden collapse of the bolometric (X-ray+UV) emission to levels below 10−3.4 LEdd. Our findings illustrate that TDEs can be used to study the scale (in)variance of accretion processes in individual SMBHs. Consequently, they provide a new avenue to study accretion states over seven orders of magnitude in black hole mass, removing limitations inherent to commonly used ensemble studies.