How to mark topics as solved

I have seen that when something gets solved there is usually a link to the post that solved the issue at the top of the thread. How do we add those to threads if the issue has been resolved by one of the posts?