See below the bash man page's QUOTING section:
Words of the form $'string' are treated specially. The word expands to
string, with backslash-escaped characters replaced as specified by the
ANSI C standard. Backslash escape sequences, if present, are decoded as
follows:
...
\n new line
...
The expanded result is single-quoted as if the dollar sign had not been present.
This syntax is not part of the official Unix Bourne shell. It might be specific to bash.
To know about Linux join the Linux training