Choose a topic you are interested in, even passionate about. After all, you're going to be spending a lot of time working on your thesis. Make sure the topic is narrow enough to be manageable.
Find a thesis adviser--a professor from your college or university who will help you prepare and present your thesis. She will help you to further narrow your topic and point you toward research material.
Research your topic, taking notes as you go. Be sure to consult the best texts in your field of study (your adviser may be able to help with this). Include page numbers and bibliographic details with your notes. This will make sourcing your thesis much easier.
Create a thesis outline. The focus of your thesis should be a research question (your topic) and a considered answer (your educated opinion). Make sure you have enough points to create a comprehensive (and lengthy) paper, but not so many that they overwhelm your focus.
Start writing. Following your outline, fill in the body of your paper. Be sure to refer to both published texts and your own opinion. Remember, the focus of the thesis is what you think about the topic. As you go, cite your sources using the style guide preferred by your school or faculty (APA, MLA, Chicago, etc.). If you're unsure about any stylistic point, check the relevant guide.
Revise your paper. If possible, get one or more friends to read it over to make sure it makes sense. Make sure it is formatted correctly (especially your citations). You can ask your adviser to read it over once it has been polished.
Finalize your thesis. Make sure every detail is just the way you want it to be. Add a title page, check formatting and style, reread the entire paper, and add a note acknowledging your adviser and anyone else who assisted you in preparing your paper.