Create a migration for the join table with the following command:
$ rails g migration questions_tags question_id:integer tag_id:integer
Create the table in the database:
$ rake db:migrate
Rails magic will help you populate the join table. I created a many-to-many code quiz with a has_and_belongs_to_many example that you might find helpful.