I would add to Jay's answer "try to prove theorems" by saying that you learn to write clear mathematics by writing and rewriting, preferably using Latex, for easy revision, so that the matter and the layout become as clear as you can make it. You also have to learn to read what you have written to find the errors, lack of clarity, and poor layout. My supervisor Henry Whitehead you should write your paper, then put it in drawer for six weeks, and then rewrite it without looking at your draft! I confess to have rarely followed this method.
I remember in my early years of teaching remarking to two students on their homework: "Please read what you have written, and see that it is nonsense, where I have marked in red!" One did precisely this, and went on to get better and better and got a very good degree. The other carried on exactly the same.
Many of us have benefited greatly from the detailed criticisms of supervisors, and referees, and their care in reading what we have written. To be of most benefit, students should be required to write and rewrite their work; this does not happen often on pure logistic grounds. But I have tried it on a small scale with first year students. For more details, see the course Ideas in mathematics.
Also you should realise that published work is usually the result of a series of approximations. A proof usually has an idea controlling it, but the first written version may have serious flaws, of various kinds. One may leave it for days, weeks, months, years, but on rereading there one sees something worthwhile, but needing a lot more work. This is where craftmanship and a professional approach are essential.
It was said of Grothendieck that he would work extremely hard to get the right concepts so that the proof became essentially tautologous! He also commented on "the difficulty of bringing concepts out of the dark!"