Q: When would you use $_post instead of $post?
Whenever I think it's applicable, for your example I have no idea.
Q: What's the difference and when would you use $_post instead of $post?
The difference is that you are using different variables.
This is more or less a coding question, but I try to be as helpful as I can to answer it in the context of WordPress.
$_post is just a variable, the
$ identifies that it's a variable and
_post is the variable's name. Those names are case-sensitive btw., so
$_POST are all different variables. And
$post for sure is as well.
If you want to learn what's in a variable - ie to find out more about it - you can make use of the var_dump() function:
This can be helpful to find out more, because with the code you provided it can not be said for what the
$_post variable stands for.
As variables can contain any value (incl. being even not set) you need to find the part of the code that is setting the variable.
Special Meaning of
$post in the loop
$post has a special meaning in the context of the_loop: It contains a reference to the current post in the loop.