I'll provide the steps for TeXstudio, I presume it will be similar for TeXmaker (I don't use this editor...)
If you have already installed a TeX distribution (e.g. MikTeX, TeXLive) and an editor (in this case, TeXstudio), and you still experience this error, then you'll need to direct TeXstudio to the relevant engine (e.g.,
Options -> Configure TeXstudio -> Commands, click the blue folder icon for
PdfLaTeX, like so:
When you click the icon, a window pops out asking you to find the
pdflatex.exe program. If you installed MikTeX and used the default location (as I did), then you should be able to find
C:\Program Files\MiKTeX 2.9\miktex\bin\x64
Select it, and click ok, then you should be able to compile successfully.
The same can be done for the other engines.