In the source code.
There are tools that can extract specific comments into a separate document. For instance, comments that explain what the function does, what the parameters are, what the return value is, etc., could be extracted to generate the documentation of the code (Doxygen would do that)
Apart from documentation, most of the time, comments are in the code and visible only to the software engineers who read the code, so it gives them a better understanding of what the code is supposed to do.