1. Inline
You can write an equation, such as E=mc^2, inline by writing $E=mc^2$
2. In a block
You can create a block by writing something like this:
$$
\sqrt{(-1)} \; 2^3 \; \sum \; \pi
$$
which renders like this:
\sqrt{(-1)} \; 2^3 \; \sum \; \pi
3. Using the keyboard shortcut
Press Ctrl + Shift + M
This brings up Insert Inline Math box.
4. Using the toolbar
You can also add a block from the toolbar using the Insert Math function.
For more information see here:
