Japanese can be written either horizontally or vertically. Vertical writing is known as tategaki (縦書き) and is notably used in manga. When writing vertically, columns of text are read top-to-bottom, right-to-left, which is why manga panels are also read this way. Horizontal writing is called yokogaki (横書き) and is written left-to-right, top-to-bottom exactly as English text is. There's also an obsolete form, migi yokogaki (右横書き), which is read horizontally but right-to-left; this is only used in a couple of series for stylistic reasons. The orientation of the characters in all of these styles of writing is the same.
Both styles can be found in anime. I think it is probably true that horizontal writing is more common than vertical writing, but it depends on the format of the writing. In general, horizontal writing is the more modern style, which was adopted during the Meiji era to conform to western styles of writing. Traditionally Japanese is written vertically (this tradition originates in China as do most Japanese linguistic traditions). The Meiji era is also when the Japanese language was really standardized (before that it was basically a collection of regional dialects), so naturally this was a time when a lot of changes were made to the language and partial adoption of horizontal writing is just one of them.
In terms of usage, vertical writing is used in newspapers, novels, calligraphy, and manga, while horizontal writing is used for academic writing, computer text, and many other everyday tasks. The text you see in anime is usually fairly representative of what direction it would typically be written in Japan. Likewise, in manga, text other than dialogue (e.g. on signs) often appears both horizontally and vertically. For anime, when there is flashing text on the screen not part of any signs (e.g. in Bakemonogatari), these are more frequently horizontal, probably because television screens are oriented horizontally (landscape), but there are examples of vertical writing in such cases as well.
Here's an example from Monogatari Series Second Season (episode 7) with both tategaki and migi yokogaki writing. The sign on the left is written vertically, while the ones on the right is horizontal but right-to-left.
Here's an example of flashing text from the same episode, written with ordinary yokogaki (left-to-right) writing: