I was in a shul recently and I briefly read parts of a book that was speaking about the importance of not talking in shul. I read that someone who talks in shul is going to hell, and a lot of other things that really scared me.

What are the actual Halachot regarding this topic? Thank you!