Thesis research and writing need to satisfy several different institutional expectations, so planning is important
Finding a good advisor and research problem
One critical part of the thesis is the setup, wherein you find an advisor, identify a problem, work out a project plan, and have the plan accepted. The situation is helped considerably if you establish a connection with a potential advisor a year or so before you start on a thesis--by taking a course, working in a laboratory, or helping as a teaching assistant.
Developing a plan.
Planning can compensate for lack of research and writing experience. By identifying the tasks and working out a realistic schedule--using suggestions from your advisor--you can see how phases of the research process fit together and you can anticipate problems before they get out of control.
Carrying out the research.
Part of the time may be devoted to literature research as a way of getting a good grasp of the problem and your methodology. A big part of the research time, especially for less experienced students, will often be given to project design and setup. It may take two months to design, construct, and calibrate an apparatus and only two weeks to run the key experiments. Learning how to manipulate new instruments and statistical packages can take a great deal of time, so try to factor that into your initial plans.
Writing
Writing. The writing aspect of research is easily underestimated. It takes place through the entire project, from the initial proposal, through the keeping of a laboratory notebook, to the initial and final drafts of the thesis itself. Writing is part of the conceptualizing and analysis of subject matter.