Hi,
When you download an app from the store it will decide the best version suitable for the device requesting the app. You will get a xap / appx file chosen from possible multiple different packages that developer has provided for an app. If it is a Windows Phone 8.1 XAP, you cannot install it on PC, at least not directly because the app manifest and other supporting files and made especially for Windows Phone. And since it's a Windows Phone 8.1 XAP it's probably built for ARM platform. So unless your PC has an ARM based processor you certainly cannot install it.
This should be possible with most of the Windows 10 universal apps since they usually have universal and conditional code that works on every device and app manifest is same on every platform. But you still need to have downloaded a xap / appx that has the same processor architecture as the target device where you want to install the app.