Anything that burn with flame contain volatile substance. These volatile substances vaporise and they burn with a flame.
Every substance does not contain volatile compound so does not burn with flame.
For eg. - Coal burns without producing a flame. It just glows red.