Unless you have your device Developer unlocked, you will not be able to sideload apps.
For consumer devices, if you download an XAP on your PC from the store and try to install it on your phone, the phone first checks the store for its validity and then installs.