This is a duplicated question. Those are diffents types of line ending characters. You can get information about the differences on:
Difference between CR LF, LF and CR line break types?
For its relation and importance on git, I think this part of the GitHub documentation expresses it very well:
Every time you press return on your keyboard you insert an invisible
character called a line ending. Different operating systems handle
line endings differently.
When you're collaborating on projects with Git and GitHub, Git might
produce unexpected results if, for example, you're working on a
Windows machine, and your collaborator has made a change in macOS.
You can configure Git to handle line endings automatically so you can
collaborate effectively with people who use different operating
systems.