SourceLink allows users to step into the sources of a library during debugging. Description from the dotnet docs:
SourceLink is a technology that enables source code debugging of .NET assemblies from NuGet by developers. SourceLink executes when creating the NuGet package and embeds source control metadata inside assemblies and the package. Developers who download the package and have SourceLink enabled in Visual Studio can step into its source code. SourceLink provides source control metadata to create a great debugging experience.
While the quote only mentions Visual Studio, it should also work with Rider and VS Code.
The sources are fetched from GitHub. The NuGet package includes information about which commit was used to build the package.