Context. Understanding stellar activity in solar-type stars is crucial for the physics of stellar atmospheres as well as for ongoing exoplanet programmes. Aims. We aim to test how well we understand stellar activity using our own star, the Sun, as a test case. Methods. We performed a detailed study of the main optical activity indicators (Ca II H & K, Balmer lines, Na I D1 D2, and He I D3) measured for the Sun using the data provided by the HARPS-N solar-telescope feed at the Telescopio Nazionale Galileo. We made use of periodogram analyses to study solar rotation, and we used the pool variance technique to study the temporal evolution of active regions. The correlations between the different activity indicators as well as the correlations between activity indexes and the derived parameters from the cross-correlation technique are analysed. We also study the temporal evolution of these correlations and their possible relationship with indicators of inhomogeneities in the solar photosphere like sunspot number or radio flux values. Results. The value of the solar rotation period is found in all the activity indicators, with the only exception being Hδ. The derived values vary from 26.29 days (Hγ line) to 31.23 days (He I). From an analysis of sliding periodograms we find that in most of the activity indicators the spectral power is split into several “bands” of periods around 26 and 30 days. They might be explained by the migration of active regions between the equator and a latitude of ∼30°, spot evolution, or a combination of both effects. A typical lifetime of active regions of approximately ten rotation periods is inferred from the pooled variance diagrams, which is in agreement with previous works. We find that Hα, Hβ, Hγ, Hϵ, and He I show a significant correlation with the S index. Significant correlations between the contrast, bisector span, and the heliocentric radial velocity with the activity indexes are also found. We show that the full width at half maximum, the bisector, and the disc-integrated magnetic field correlate with the radial velocity variations. The correlation of the S index and Hα changes with time, increasing with larger sun spot numbers and solar irradiance. A similar tendency with the S index and radial velocity correlation is also present in the data. Conclusions. Our results are consistent with a scenario in which higher activity favours the correlation between the S index and the Hα activity indicators and between the S index and radial velocity variations.