Aquí te dejo un ejemplito
Código HTML:
<html>
<head>
<script>
function comprobarCampo(){
if (document.getElementById("campo").value==""){
alert("Rellene el campo");
return false;
}
}
</script>
</head>
<body>
<form onSubmit="return comprobarCampo()">
<input type="text" name="campo">
</form>
</body>
</html>