Will I get an ugly scar from eyebrow piercing after it got infected?

Hope not. I hope the piercing has been removed. If not, it needs to be. The brow is a pretty forgiving area as regards scarring. The main thing is to keep the site clean by washing with soap and water several times a day, perhaps apply Bacitracin ointment after washing, and generally get the infection cleared up asap. If it does not improve quickly, see your doctor.
Scar Risk Factors. Infection and delayed healing can certainly increase your risk of poor scarring. You should consult with a physician who is versed in scar management to plan the best course of treatment to optimize your healing and scarring.
Possibly. Infection can result in a poor scar. There are two recommendations. First let the infection totally subside and possibly consider scar revision at least six months later, after an evaluation by a plastic surgeon. Second, avoid any future piercings, since you may be prone to infections.
Eyebrow piercing. If properly treated and an abscess is avoided, loss of hair can be minimized and healing may proceed uneventfully with minimal scarring.