Modularizing repository: submodule vs subtree

Although I'm using both of them, I have quite vague understanding of this topic. It can be interesting to have a deeper look into that.