What’s the importance of htaccess
It lets you configure a web server on a per-directory basis without restarting the server
where is it located
In the directory you want it to apply to
and how do I know if mine is correct?
It does what you want it to do (which could be any number of a huge number of different things) without filling your log files full of errors.
Is it essential to running an apache server to include an htaccess file?
Some other webservers also support htaccess.
Is it possible to fix broken links using the .htaccess file?
Define "Fix". Server configuration certainly can't make deleted content reappear.