The comments already provide good information. Much of it has been written many times, in response to many users, who have problems with (Mik)TeX on Windows, using a GUI. Commenters, please forgive me if I attempt to summarize your info as an answer:
I am specifically addressing users who have used TeX before, in any content. So the question is "Why does it not work now, when it worked in the past?" rather than "Help me, I know nothing about TeX."
(1) Windows has various file permission strategies, which sometimes confuse a program installer. This is especially the case when you computer has migrated through Windows 7-8-10, but also applies to those using a fixed version of Windows.
One tactic is to perform an "administrative install" of TeX. To do that, right-click on the installer, and pick from the context menu. You will get a warning message. This can only be done if you are an administrator, of course. However, I advise against installing any program on Windows with administrative rights. The program will likely install, but you are inviting trouble.
Another alternative (which I heartily recommend) is to get a "portable" installer for your TeX system. MikTeX has a portable version. TeXLive can also be installed in portable fashion, using the same installer as you ordinarily would use.
Then, you install TeX into a convenient sub-folder of your user home directory (preferably avoiding paths with spaces or underscores in the name). You can even install to a USB. And, when finished, you can copy the installation and use the copy on a different computer.
If the issue involves file permissions, the portable installation avoids those issues, without requiring administrative rights.
(2) Sometimes, the problem involves an interaction between the GUI (TeXStudio, WinEdt, etc.) and the TeX installation.
To see if this is the case, attempt to compile your document via command line.
If your TeX installation is not portable, do this: Open a command prompt in the directory where your *.tex document is located. Then type whichever one of these commands is closest to what you are trying to do:
If that fails, then the problem is with the TeX installation rather than the GUI. If it succeeds (look for the PDF in the same folder) then the problem is an interaction with the GUI.
If instead your TeX installation is portable, then (in Windows) launch it, so that its menu appears. From its menu, choose a command prompt. Then do the above.
(3) If you are using a GUI and it cannot locate TeX at all, then use its program menu, and see if you can change something in the configuration, where it will look for TeX binary files.
(4) This does not solve every problem. But it does seem to address most issues on Windows.
(5) On the other hand, the most common problem among Linux users is having a distro-installed TeX (or portions remaining from previous installation) conflicting with a manually-installed TeX.