When you’re meditating, thoughts are like visitors. They enter unannounced. Some, you love. Some are obnoxious. They all demand your attention in their own way.
How you respond when thoughts enter your mind is up to you. You can entertain them, pretend they aren’t there, or even try to kick them out. If you invite more of them, pretty soon you’ll have a full house (a full mind) — a big pleasant or unpleasant party inside your head.
To cultivate your meditation practice, be kind and polite to your thoughts without giving them too much attention. You can greet and acknowledge them, and then go back to focusing on the breath. They’ll be on their way. Eventually, some will come back and that’s fine. You are under no obligation to feed them dinner.