The things you should do to improve your writing depend a lot on your current level. One thing you can do immediately is apply strategy. We have some TOEFL writing templates that might interest you! Beyond that, it gets a little trickier. ETS actually has a quite comprehensive set of recommendations broken down by level, which are linked below.
|Writing based on Reading and Listening
|Writing based on Knowledge and Experience
If you know roughly where you fall in this ETS chart, you should see their full set of recommendations! What follows below is a general set of recommendations to improve your writing skills. :)
Practice writing English every day. Aim to produce 200-350 words without stopping. You can write about a personal topic one day, and then write a response to an academic or news idea another day. Try to write academically, but focus on making sufficient content without a lot of hesitation.
Practice writing about well-defined subjects in specific context. The better you are at answering a specific prompt, the easier the TOEFL tasks will be. A good exercise can be to read a short article and then brainstorm your main points to an essay you would write arguing the opposite point.
Study the English media you like to consume. Pay attention to how ideas support a position and practice generating ideas to support a position. One major component of your writing score is your ability to organize and express a main idea. Learn from your favorite print (and audio!) sources the art of structuring an argument or story.
Think about who will be reading your writing. In some situations you need to write in a formal manner and your sentence structure, vocabulary use and general style should reflect that. In other situations, you can use more casual or informal expression. Work on tailoring your message depending on the audience. Draft a response for a formal and informal audience.
Focus on grammar and mechanics. Focus on a different aspect of English grammar each week and complete grammatical exercises that reinforce this aspect. If you can work more complex or nuanced grammar into your writing, your score will improve!