What's unclear from your initial question, is, if something is physically stuck in your headphone jack, or if you just assume "it is broken" because you can no longer hear sound from your internal speakers.
If a headphone cable broke and a physical part is remaining inside the headphone jack, you need to remove that part. There are several ways to go about that. I was once able to grab a stuck part with a very small forceps.
There's a known issue where MacBook Pros think, an optical cable is connected to the headphone jack although that is not true. In that case, insert a headphone jack and remove it again (this may take up to 1 or 2 minutes) but eventually your internal speakers will come back on, once the MacBook understands that nothing is connected to the headphone jack. If your MacBook indeed thinks there's an optical cable connected, you'll see a red light in that headphone jack.