Can you tell me if it is allowed to borrow a diagram from another post in this site? Is it necessary to cite both the source and the post from which it was borrowed?
(Answer updated by including Moderator inputs)
All user contributions on Physics.SE are licensed with the following stipulation, as may be seen from the Terms of Service (Section 3), which specify the exact attribution requirements for reusing content outside of the Stack Exchange network:
user contributions licensed under cc by-sa 3.0 with attribution required
The same may also be seen by scrolling to the bottom of this page, which is a mere reminder of the same.
So, attribution is required, i.e. you should cite the source. Once you do that, reusing ("borrowing") images is allowed, which is consistent with this site's policy on plagiarism.
As an aside, that's also true as a safe, general practice in science.
Hope that helps :)