Stack Overflow is not a forum.
However, if you are talking about not allowing any more answers on a particular post, then it can be done by the moderators of Stack Overflow or privileged users who can vote to close your question. Once the post reaches 5 votes, it is automatically closed.
It is called "closing" and the question is deemed as "closed", which means no more answers are allowed on that post.
NOTE : "Closing" of posts is not done when a user has found a solution to the problem. It is usually done when the question does not conform to the principles and guidelines of the website.
Also note that closed posts can be voted for re-opening by the users who have the privileged. And when there are 5 votes to re-open a previously closed post, then the post is opened again.