You need to have PHP CLI (command line interface) to do this. It often comes with the PHP installation package (or a separate package).
So as @James mentioned it you need to precede you script name with the CLI PHP executable which in windows is php.exe somewhere in your install directory.
In UN*X systems it's somewhere in /usr/bin or /usr/local/bin or /opt/local/bin. If it is in the PATH you can simply execute it like this:
php your_script.php
But keep in mind that running your script from server will be not the same as running from a webserver. For e.g. you won't have the POST or GET variables. So your script may not work.
Update
You can make the cron ran scripts unreachable for your webserver by making it unreadable by the user who is running the PHP scripts by the http daemon (usually www-data).
I recommend to make it readable only by the user who is running it from cron:
chown cronuser your_script.php
chmod 0400 your_script.php
Update2
If you're running your script in cron with the same user as the webserver does, then at the top of your script stop it from being executed:
if (!(php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']))) {
header('HTTP/1.1 403 Forbidden');
exit;
}