If you have a small paper clip you should be able to put a really small amount of super glue on it to fit in the dead center hole in most common headset male connections. Let it dry for 10 minutes then should be able to pull it out. had to do that on a htc phone when a cusotmer dropped it and it pulled out just fine. That is the simplest without having to worry about damage. Some will use a dremel tool to put a hole in them and put a tiny screw in the hole they made. Some ideas but this should do the trick

I replaced the headphone jack. It was not that hard and probably a lot easier than digging the broken part out.

Just tried the paperclip method. Glue the tip, insert into the small hole you should be able to see. Hold for a few moments to ensure that the glue is binding and then leave for a bit. I was really sceptical about this trick, but I left the iPad, made a coffee, came back and pulled the remaining jack out without any effort at all. Just make sure you get enough glue to get a bond but not so much that it spills over and glues the jack in. I put my paperclip in the tiny superglue tube.

I think the glue method could lead to more serious damage as could the drilling option.

This is how I extracting the remaining jack stuck in the socket. I got hold of an unused indoor Ariel the telescopic type there's usually 4 or 5 sections each being a different diameter cut off the one that will fit perfectly into the jack socket push into socket turning the piece of ariel slightly, when it feels like it will go no further pull out the broken piece of jack should be attached to the ariel. It worked for me and took just 20 seconds. good luck.

It's time to speak out for your right to repair

Dear Minnesotans,

Right now, Minnesota has a chance to pass the first Fair Repair bill in the nation.
We have a chance to guarantee our right to repair electronics—like smartphones, computers, and even farm equipment.
We have a chance to help the environment and stand up for local repair jobs—the corner mom-and-pop repair shops that keep getting squeezed out by manufacturers.

We've been working with local repair companies, non-profit refurbishers, and tech-savvy politicians to come up with a solution. And they've done just that — Minnesota is the first state to consider a Fair Repair Bill.

If you agree with us, find out who represents you in the Minnesota House of Representatives.
Tell them you support the bipartisan Fair Repair Bill, HF 1048. Tell them that you believe repair
should be fair, affordable, and accessible.