I've spent the last hour browsing the site for tips on this practical question. So if it's been previously answered I apologise, but I have made an effort.
Just type them like you would any other character. Posts on SE are encoded using Unicode which can handle just about any character from any known alphabet.
The most common way to do this is using an input device configured for the language of your choice. Almost all operating systems have a system to add keyboard layouts for other languages. Adding more than one typically also adds a menu somewhere and often a keyboard shortcut to switch between them. Adding Greek and Hebrew keyboard layouts to your operating system's region or language settings should do the trick.
If you are unfamiliar with the language in question and need to pick out a couple of letters, some operating systems have an on-screen keyboard system that will show you a popup keyboard that you can click on letters. This helps when you need to scratch out one word and aren't fluent at typing it the target language.
Also for single words or characters you can often find them in some other source you're working with and copy/paste them into your post.