I believe you installed our Webcam Security Camera app from Microsoft's Windows Store. Windows Store apps are designed to be like an app on a smartphone / tablet. Due to the system restriction, it will pause if you switch to another app. To keep it running, you need to change your computer's power policy to disable the screen saver and also disable the computer from entering sleep / hibernation mode.
A much more robust solution is to use CameraFTP Virtual Security System (VSS) software. The detailed info is available at:
You can download it from the above page, or just visit www.cameraftp.com and click Software to download it. Compared with Webcam Security Camera app, VSS is a Windows desktop program, so it is a lot more powerful. It can support multiple Webcams at the same time, and it works with a lot of IP cameras. By default it will start automatically; you can switch to another app / program, it will continue running.