In music, the tonic is also called the “home” or “root” of a specific piece of music. The key of the piece uses the scale of the same name (e.g. the key of C major uses the C major scale, and the key of F♯ minor uses the F♯ minor scale). The tonic is the first step of that scale (so C in C Major and F♯ in F♯ minor).
The tonic is important because it defines resting points. It feels odd to finish the song not on the tonic or the chord built from stacking thirds on top of the tonic (called the tonic triad).
We often use Roman numerals to talk about the chords built from each scale step. The tonic is I when it’s major and i when it’s minor (capital = major chord and augmented chords, lowercase = minor and diminished chords).
Other scale steps or the chords built from them in a piece of music are usually discussed in relation to the tonic. In Western tonal music, the most important is the dominant (V or v but usually V), as the notes in this chord pull strongly toward the tonic. We call this instability, meaning, we don’t feel settled on a dominant triad in a key. Instead, we have a desire to hear the tonic after we hear the dominant. Many theorists argue that you only need a dominant and tonic triad to be in a key, which comes into play when you come across pieces that change keys.
There’s a little more to it than that, but having a basic understanding of the tonic and dominant relationship is extremely helpful in understanding most Western tonal music.