Homebrewers can stop fermentation in beer by chilling it to refrigerator temperatures, filtering out the yeast, pasteurizing it, or adding Potassium sorbate. Which solution you use will depend on the reason that you need to stop fermentation.
In any case, the route you take to stop beer fermentation will depend largely upon under which circumstances you find yourself in.
Once yeast gets chilled down to refrigerator temperatures, however, their activity will slow way down to the point of dormancy. At that point, they will no longer be able to eat the sugar and convert it into sugar and alcohol.
One option for stopping fermentation is to remove the yeast itself through a filtering process. Racking your beer off of the yeast cake is not enough, you will need to sterile filter your beer.
For each gallon of beer in your batch, you will add .5 teaspoon of potassium sorbate mixed into .25 cup of boiling water.
To ensure all of your yeast have died, you will need to bring your beer up to a temperature of about 140 °F for several minutes.
There is no need to worry about stopping your beer’s fermentation because the process will complete on its own, naturally, and shouldn’t need any outside help.