If something like glass gets stuck in your head, what do you do?

I remember watching a family guy episode where stewey gets a big piece of glass stuck on his head. It was very funny but it got me thinking, “what do you do?” Do you pull it out immediately, wait for someone else, or wait until you get to the hospital?