Formal:
* Fermez la fenêtre. (This is the most direct and formal way to say it.)
Informal:
* Ferme la fenêtre. (This is a more casual way to say it.)
* Cloture la fenêtre. (This is a less common way to say it, but it is still correct.)
You can also use a more specific phrase, such as:
* Ferme la fenêtre, s'il te plaît. (Close the window, please.)
* Veux-tu fermer la fenêtre? (Would you close the window?)
The best way to say it depends on the situation and who you are talking to.