/ø/ is generally found at the end of a syllable. It's the sound in "deux (2), feu, bleu, heureux".
/œ/ is generally found in a closed syllable, meaning there's a consonant following it. It's in "neuf (9), peur, soeur, oeuf".
The same thing (closed vs. open syllable) happens with the "o" as well ("pot" vs. "porte").
I hope this helps! :)