Mortar Turrets target ground enemies within range, particularly infantry. They fire explosive bundles at their targets, dealing the most damage to them and also dealing less damage to nearby enemies. Because of this, Mortar Turrets are most effective against close-together groups of infantry.
Mortars are great against Rebels as they are likely to have a lot of infantry. It works well against the popular Heavy Soldier + Medic Droid combo, although you may need a Rapid Fire Turret to take out the droids.