As a general rule, if the molecule contains only C and H atoms it will be non-polar, while if it also contains O or/and N atoms it is more likely to be polar. However, the non-polarity of long hydrocarbon chains/rings can cancel the effect of a single polar group and make the molecule behave as non-polar