Regular brushing is key, as the more dead hair you remove, the less kitty will ingest. Some cats are prone to them, other never get them. A good diet will also help, and there are "hairball preventative" treats and foods out there ...