Question: What is the difference between the  

`has_and_belongs_to_many` and  

`has_many through` relationships? When and where to use which one?

Answer: 
Many of the answers clarify that you should use `has_and_belongs_to_many` vs. `has_many through:` if you will not need any extra data or validations on the join table. 

**However**, beware of taking this approach. In the early stages of application development, it is nearly **impossible** to know what extra features or validations you may need in the far future of your project's lifecycle. If you decided to use `has_and_belongs_to_many`, and want to add one simple datapoint or validation 2 years down the road, migrating this change will be extremely difficult and bug-prone. To be safe, default to `has_many :through`
The simplest rule of thumb is that you can go with `has_many :through` relationship if you need to work with the relationship model as an independent entity.

If you don't need to do anything with the relationship model, it may be simpler to set up a `has_and_belongs_to_many relationship` (though you'll need to remember to create the joining table in the database).

You should use `has_many :through` if you need validations, callbacks, or extra attributes on the join model.