I have seen many questions and answers with nice diagrams but I do not know how to make them.
Any answer involving MathJax and/or uploaded pictures is welcomed.
This MathJax tutorial contains instructions for commutative diagrams. That should be enough for basic drawings of this type. You might also want to check out the MO FAQ post Best way to post graphics to MO. This post assumes that you already have the image file.
Pretty diagrams are nice, but would advice against spending too much time polishing graphics as long as the message gets across and the file is not too big. I think a simple screenshot png is often a sufficient form of graphics. Of course, nice graphics is a good idea if you already have an excellent image or your post relies on a high quality diagram or drawing.
As Stefan Kohl mentioned, you can click the "edit" link below any post to see how it was created. Similarly, you can right-click on any MathJax formula an select "Show Math As > TeX Commands" to quickly see how to write that formula. This way you can easily copy and paste formulas from a question to your answer or comment.