Some preference settings you should experiment with:
(1) Control-click on an application icon in the dock, go to Options. There you determine whether an application is assigned to a desktop, all desktops, or none.
(2) There are three relevant checkboxes in System Preferences, Mission Control.
There's this, too, if you haven't already seen it: