Train it. Mine will sit, stay, come when called, walk to heel, retrieve to hand, jump, not chase live stock etc etc etc. Same as any dog, they need training.
However, all sight hounds are hard wired to chase stuff, and if you don't like that, don't get one. Because sooner or later it will see a rabbit / squirrel / deer / crisp packet and take off flat out lol.
Having said all of the above about my whippet, if we are walking through the woods / fields etc and some form of quarry jumps up that he knows is on the menu, once he starts after it, you'd have to scream yourself blue in the face to stop him. But then I don't try. . . .
But he doesn't chase anything he isn't meant to because he understands the consequences. . . .