Any Unix/Linux based information on creating a hardlink will apply to macOS
Also there are symbolic links as well (the ln -s ...)
macOS also has GUI level Aliases, and Catalina introduces a thing called "Synthetic Firmlinks"
Hardlinks, symbolic links, Aliases and Synthetic Firmlinks are all similar and totally different.
Hardlinks are directory entries that point to a file's metadata using file system internal file identifiers (often called an inode). Think of a directory entry as an address book entry pointing to a family member. The address book entry is not your family member, and if other family members have address book entries to the same person, you do not get extra family members. And if someone throws away their address book, your family member is not affected.
A Hardlink is a file system abstraction and can be used by any program, app, process on macOS.
A hard link does not care if you rename the any of the directory entries that point to the same file. That does not affect the file system internal file identifier. In fact the file itself does not know its name. The file itself only knows its file identifier. Names only exist in directories. The file itself does maintain a reference count for the total number of hardlinks that point at it. when a hardlink is deleted, the reference count is decremented. When the reference count goes to zero, the file is deleted (good thing address books do not have reference counts 😀
A symbolic link is a file that contains a file system path to the real file. Like writing down directions to the Taco Stand. If the Taco Stand moves, the symbolic link will not know it moved, and will not find it. In fact, if the Taco Stand changes it name, but is in the same place, the symbolic link will not find it. Symbolic links can contain absolute path information, or they can have relative path information, as in go up 2 directories, then down this subdirectory tree to this file kind of relative paths.
A symbolic link is also a file system abstraction and can be used by any program, app, process on macOS.
A macOS Alias is used by macOS GUI applications that use the file manager GUI framework. An Alias contains the internal file indentifier, but it does not increment the hardlink ref count. An Alias also contains a path to the file. So if the file is moved, the internal file system identifier can still find it. If the file is deleted, and a new file with the same name is put back in its place, the Alias path can find it (this is a common GUI app trick; save the file as a temp file, delete the original, rename the temp file to the original name; this changes the internal file system identifier). An Alias also knows if the file came from a network volume, and will attempt to reconnect to the network attached volume if you access the file via the Alias. An Alias may also have its own Icon (which can make an Alias a very large file).
Because an Alias is a GUI file manager framework abstraction, it is ONLY available to GUI applications, or programs that intentionally like against the file manager framework and use its file system access routines.
Synthetic Firmlinks are new in Catalina, and macOS uses them to glue together the Read-Only "Macintosh HD" volume and the Read/Write "Macintosh HD - data" volume. On a Catalina system "man synthetic.conf". You can also read about firmlinks at
https://derflounder.wordpress.com/2020/01/18/creating-root-level-directories-and-symbolic-links-on-macos-catalina
NOTE: Hardlinks have existed on Unix based file systems since the early Bell Labs UNIX back in the '70's. Symbolic links came our of the UC Berkley (BSD) UNIX implementation. macOS Aliases have been around for awhile, at least since the '90, maybe even the late 80's. macOS Firmlinks are new in Catalina 10.15.