All hostile machines, that appear in Prey, can be divided into two general groups. The first group are the corrupted operators. They are those small flying devices that, when they are "friendly" towards the main hero, can replenish your health, suit and PSI points for free. Your first encounter with the hostile ones takes place in Hardware Labs and, sadly, they also appear in other parts of Talos I station that you are unlocked later.
Usually, operators are not challenging but most of the time they appear in groups of 2-3 which makes the fights a little bit more difficult. Their primary weapon are flamethrowers which means that you must keep your distance from them. They can be knocked down by an EMP charge and finished before they get up and continue attacking the hero. When a machine gets closer to your character then, in order to defeat it, you can use, e.g. the shotgun which is perfect for this type of combat.
The second potentially hostile group of machines are the turrets. Initially, all turrets that you come across are hostile only towards Typhons so you don't have to feel any threat from them. However, this situation can change when you unlock a few alien abilities in the later parts of the game which means that you will be treated as an enemy by the security systems.
Turrets have rather strong firepower so you have to keep that in mind, especially when you are playing on a higher difficulty level. Every fight should be started by throwing an EMP charge which weakens them and render harmless for a moment. This allows you to get closer to them and defeat the turrets from a shorter distance. A big "problem" for turrets is that they are immobile. Use this to your advantage and look for occasions to flank them or approach them from behind. A successful maneuver allows you to destroy them easier or even reprogram them if you have Hacking II ability or higher.