I have a component in a separate repository which I would like to use in an application in its own repository. Later on, I will probably pull in some other 3rd party libraries too.
From what I know I can achieve similar things using symlink or submodule. Is this the right understanding? If so, when should I use one versus the other?
They are different concepts that achieve similar, but not equal, things.
A symlink points to another file inside of your computer. This is important to know, because it wouldn’t make any sense to put a symlink inside of your repository, because other people wouldn’t be capable of using the same symlink (so, conflicts ahead, because everybody would try to edit this symlink to use the submodule on their own respective computers).
A submodule tells your repository that it should rely on another repository. You can put that in your repository because it points to the main repository of the submodule. When you publish your repository, other people will be capable of cloning it and using the submodules.
So, I’d go with submodules. It makes more sense, you can work across computers, and you don’t rely on static paths.