Question and answer type website are usually called as forum website. Technically it is different from normal website. Forum site allows you to give permission to the user. You can assign few users as editors, normal users and restricted users. Forum sites needs permissions because not everyone are allowed to access all the resource. For example in Yahoo Answers if any user is spamming, editors have rights to delete his/her content. This kind of constraints are not applicable for normal website.
How to build question answer type website?
Lefora is a website which provides you this facility. It has features like popular social network integration, email notification to the user, games, chat facility and automatic spam filters. This website allows you customize the layout of your website. You no need to type any html/java script to customize the layout. You can just use the drag and drop tools available in this website to create a new forum website.