From Wikipedia:
Samba is a free software re-implementation of the SMB networking protocol, and was originally developed by Andrew Tridgell. Samba provides file and print services for various Microsoft Windows clients
It’s a way to allow Linux to present itself as a “native” server for Windows - i.e.; it will make your Linux server look like a Windows server to other Windows machines/clients.
It’s perfectly fine to use Samba if that’s what you need - Windows and macOS machines can easily access Samba network shares.
If you’re looking for a “Linux native” file sharing protocol though, you might want to check out NFS.
Personally, I’ve always just used Samba because of its cross-platform compatibility.