If a dog's whisker is pulled out or comes out on its own, it will grow back on its own. However, the dog needs its whiskers to feel confident in its movement as it uses its whiskers to sense the world, so they should never be trimmed or yanked out intentionally.
A dog's whiskers work by sensing the vibrations that are in the air. They can sense the direction of wind and air as well as the speed. This helps them discover what is around them, including the size, motion and shape of prey animals or its human owner's next-door neighbors. Dogs have different amounts of whiskers depending on the dog's genetic code.