Depends on how you log in.
Generally if you log in at the console and use startx you should edit your ~/.xinitrc file (or create on if it doesn't already exist)
You can do lots of complex stuff with it, but just to load the window manager you need one line
exec gnome-session for gnome
exec startkde for kde
exec blackbox for blackbox
exec wmaker for window maker
exec sawfish for sawfish
and so on.
If you use a graphical log in, then generally it is the same but you should edit ~/.xsession instead of ~/.xinitrc
Your distro might provide tools to help you change your window manager.