I was wondering if there's any difference between
на английском
and
по-английски
(for example when asking how to say something in English).
They are more or less interchangeable as far as verbs for speaking and writing are concerned; there's a slight idiomatic preference for по-английски when referring to speaking and for на английском for writing. However, понимать "to understand" requires по-английски, while you have to use на английском if it refers to a noun rather than a verb — such as разговор "conversation" or книга "book".
In general, на английском is narrower in meaning, implying as it does the word языке, whereas по-английски is not limited to language. Thus детектив на английском is "a detective story in English" whereas детектив по-английски is "a detective story à l'anglais", "a very English detective story".
They are almost interchangeable.
Though, you should always remember the following:
Which means that a book, subtitles, an e-mail or an inscription can only be "на английском" but not "по-английски" (unless you want to imply that they bear some English flavour, as Nikolay Ershov illustrated with «детектив по-английски»)
It also means that sushi and pelmeni that English people do in some unique way can only be «пельмени по-английски», «суши по-английски» (even if I made them up, and those do not exist).
As a bonus, since there is no American or Austrian language, you only have «по-американски», «по-австрийски». Things can be done "American way" but cannot be written or spoken in American languge.
Others have answered the question, but note there are some languages where the "по-английски" form doesn't really exist because the name of the language is not in adjectival form.