Standard English is a social dialect. It is the dialect used by well-educated English speakers throughout the word. It is the variety of English which is usually used in print, and which is normally taught in schools and to non-native similar situations.
The different between standard and non-standard has nothing in principle to do with the differences between formal and colloquial language. Standard English has colloquial as well as formal variants, and Standard English speakers swear as much as other.