Hot glue is not a particularly strong adhesive for situations which require this sort of bonding. Conventional liquid wood glue is much stronger and will be easier to apply as well.
Ideally, you should have a clean face on the broken part as well as on the chair section to which it will bond. This means remove any loose splinters from the faces. You will also get much better results if you have a method to clamp or otherwise force one face into the other. Even simple masking tape is better than nothing, but stronger tape will give better results. A genuine wood clamp is ideal, but costs money.
If you can position the chair in such a way as to coat the surface of the break with wood glue, then place the leg on that surface and load it with weight, you'll do as well as a clamp, if you get sufficient weight concentrated on the joint.
Because chair legs are subjected to lateral forces, even repairing the joint with glue will not hold over time, unless you are extremely careful with movement of the chair while sitting.
You can see the screw holes in the caption image. The screws provide the mechanical strength and the glue reduces/removes the movement that might otherwise loosen the screws.
If you are able to install screws through the joint you've glued and into the chair, you'll improve your chance of having a strong bond that will last.
Without photos of your break, this is guesswork. If you are able to take a photo, simply focus only on the damaged area or crop out any background you wish to not be displayed.