1. Identify a problem statement/research question
Link your interest in a specific program (MS or Ph.D. research) to the identified problem statement/knowledge gap. E.g. I may be interested in a Ph.D research in Environmental Toxicology due to the problem of Arsenic contamination in groundwater all over the world. This also applies to MS taught or research programs.
2. Describe how the program would solve this problem or answer the research question
Your reasons might be the knowledge and skills that would be gained from the program (that you are willing to apply). For someone interested in a Ph.D. position, you might need to describe a particular project you would be involved in (at this point you do not need to be quite detailed about it).
3. State the academic/research experience/background that qualifies you for this program or Ph.D. research. You might even describe professional engagements that are relevant to the program of choice.
4. Identify the reasons for your school choice
It might be the ranking or research outputs, quality of faculty members, or even the rate of international students' acceptance. For an MS program, you want to subsequently state other reasons the program is a good fit for you. For a Ph.D. program, you want to also state the reasons for the choice of the specific potential advisor(s). Let them know why you want to work with this particular faculty member.
5. You may need to state some other qualities you possess that make you a suitable candidate: e.g. social skills, leadership, volunteering, etc.
6. Describe your aim and objectives during the program
For example, be deliberate about the kind of techniques/methods you want to learn or the proficiencies you want to gain. The best way to know these is by visiting the website of the program or the advisor (MS research and Ph.D.).
7. Indicate your long-term career goals
Link 6 to this. You may also need to describe fully how the program would help you achieve your long-term plans.
I hope this helps.
NB: Your SOP should not exceed 2-pages. Keep it short and concise.