<script async src="script.js"></script>
<script defer src="script.js"></script>
Flavio Copes wrote a great article on async and defer here. In the article he explains really well how async/defer works and why you should use them. Please read that article first to really understand how they work.
For the context of WordPress my rule of thumb is:
For more information on how to actually use async/defer in WordPress, read this article on wp_enqueue_script() first and then this article on how to add async/defer attributes for scripts loaded with wp_enqueue_script().