To make that part of my existing site, I'd use custom post type, Say a post type as
QA and registered users can do post( ask questions) and others can comment(give answers). Using the Roles and Capability feature of wordpress we can create moderators/editors/users for question answer section.
We can configure wordpress to accept posts of that post-type (
QA) to be submitted on front-end (with form on ask question page) and the wordpress comment system is ready to use as it is.
We can create a wordpress query with different parameters to show result as we want.
finally, the ratings can be handled by plugins, there are plenty of good plugins available in Wordpress plugin directory to start with.
StackExchange uses some in-house developed systems, It is not an easy task to replicate it in your wordpress site ( specially the realtime part ). And the feature you might get from a full functional forum software is possible to replicate in Wordpress but very difficult.
For light weight QA forum with less feature I'd recommend using this technique