It's basically just a simple "shoot-the-nearest-enemy" kind of engine (as used in "Tower Defense" clones etc).
Each turret selects the nearest enemy, rotates smoothly towards it (they lead moving targets), and shoots if within range and pointing in the right direction.
Bullet speed, rotation speed, firing range, firing rate, etc are adjustable via alterable values.
Enjoy