If you have a separate server to run your check script on, something like this would do a simple Ping test to see if the server is alive:
ping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -ne 0 ]
# Use your favorite mailer here:
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
You can cron the script to run periodically.
If you don't have mailx, you'll have to replace that line with whatever command line email program you have and probably change the options. If your carrier provides an SMS email address, you can send the email to that address. For example, with AT&T, if you send an email to email@example.com, it will send the email to your phone.
Here's a list of email to SMS gateways:
If your server is a publicly accessible webserver, there are some free services to monitor your website and alert you if it's down, search the web for free website monitoring to find some.