General Hux is a fictional male in the Star Wars series. The character was portrayed on screen by Domhnall Gleeson. His allegiance / loyalty is to The First Order. General Armitage Hux was first introduced to the Star Wars universe in Star Wars VII- The Force Awakens as leader of the First Order's military, answerable to Supreme Leader Snoke who we only see as a hologram in a kind of reference to the first time we see Emperor Palpatine in Star Wars V - The Empire Strikes Back. Although he doesn't hold the rank of Moff or Grand Moff, his seniority does imply he is equivalent to Grand Moff Tarkin.
He does not have any force powers and instead relies on his combat skills although he isn't seen to use any weapons, only ordering people about. In the first film, he is responsible for leading the assault on Jakku and for the Starkiller Base. Neither of his operations in the first film are successful as you might expect. In the first film, he gave one of the more nausiating speeches ever talking about the corrupt New Republic.
General Hux is seen on board Supreme Leader Snoke's battle cruiser and commands the operation to flush out the Resistance on the planetD'Qar after the First Order's base on StarKiller had been destroyed. It looked like that the Resistance got away like the Rebel Alliance did in Star Wars V - The Empire Strikes Back. Hux had in fact come up with a plan to track the Resistance through hyperspeed.
While Snoke was displeased that the Resistance had escaped, he was pleased by the fact that Hux had attached a rope to the Resistance in order to follow them. Hux's plan worked and the First Order were able to discover and disable the escaping Rebel fleet. As the Rebels had shields, the First Order were not able to crack open the space ship and capture the Resistance, the First Order had to wear down the shields before they could capture them.
After both loosing the Starkiller Base, Snoke called both Kylo and Hux to him. The three then launched a revenge attack on the Resistance Base. After the second failure which by all means wasn't as bad as the first failure, you'd have thought Snoke would have killed Hux but he let Hux live. The reason for letting Hux live was because Hux said that he was able to track the Resistance through hyperspeed which they did.
According to the expanded universe, General Hux is the son of Brendol Hux who was a Galactic Empire Imperial Officer. Brendol was loyal to the Old Republic, working alongside Jedi Knights to find the Separatists. When Palpatine assumed control of the galaxy, Brendol stayed loyal to the Empire and raised his son in the Imperial ways. Star Wars
Armitage Hux was schooled and trained in the ways of the Imperial and hadn't known any other way. Hux will stay loyal to the First Order given his rank and power. Hux may still crave absolute power and depose Kylo Ren but for now, he'll just stay being subordinate to Kylo.