Tonsil stones are from from dead bacteria,mucus and debris which can calcify and form stones .
To prevent them you need to maintain your oral hygiene.Gargel with salt water every day. Stop smoking if you smoke. After every meal brushing is necessary. Avoid sharing glasses.
You can also discuss with your doctor as you may require a surgery.