As in casting a spell, I assume that ya press the "Cast Spell" Button to bring up the list. From there, just double click the spell ya want to use. If it involving using destruction spell like Shock, it would say "Press the button to fire spell" or something like that. Using the mouselook, one have to aim at the foe, usually on front of ya with the center as the invisible crosshair. Press the fire button, which is really the "Activate Center Object" Button.
If its an offense spell, the spell would only work if ya in front of the foe (or click it if ya using the cursor mode). That way, ya don't shoot into the darkness and waste ya magic points.