In general, using
n-grams[1], probably at the character level. (So, as the article mentions, the bigram "ch" is common in German, and "qu" is much more common than "q
X" for any
X in English)
You can analyse texts you believe to be similar (in language, period, subject, etc) to the coded message you are attempting to crack, and use that to build tables of these n-grams in various semantic units.
Of course, these are useful in many more things than code-breaking, and Google have various datasets they make publically available.
The Google books ngram viewer[2] is a fun tool to play around with, or for the more serious, you can download a corpus of ~24GB of analysed web data they've crawled (from around 1 trillion source words)[3]
One actual example of a code constructed in the manner described is the Playfair cipher[4] which was used for a time in the late 1800s, but is now thoroughly broken.
[1] https://en.wikipedia.org/wiki/N-gram
[2] http://books.google.com/ngrams
[3] http://googleresearch.blogspot.co.uk/2006/08/all-our-n-gram-...
[4] https://en.wikipedia.org/wiki/Playfair_cipher