Turrets are primarily used by the Empire in areas where they don't want unauthorized people getting in. Fixed to a wall, ceiling or floor they have limited artificial intelligence, detecting you only when you come within visual range, and only firing when you're within a certain distance. Their laser packs a major blast though, and they have a full circle of horizontal motion and a reasonable amount of vertical angling, so proceed with caution. When they take a certain amount of damage there is a short circuit in the firing and motion mechanisms and the turret spins wildly, firing in all directions until dealt the finishing shot.
Suggested Method of Attack - The Assault Cannon is best for dealing with the turrets; a few quick blasts and they're history and usually you can take them out before they have a chance to get off a shot. But if you don't have the heavy firepower then an accurate weapon is your best hope. Stay out of their range if possible, or else duck in and out of cover while getting off a few shots at a time.