Difference between if & if_v2, and while & while_v2?

When I look up documentation for while, is see examples using while_v2 (while, endWhile - FlowControl - Selenium IDE Commands Tutorial).

I’ve also seen if and if_v2 (If, else if, else, end => Flow Control - Selenium IDE Commands Tutorial).

What is the difference between them, and when do you use one instead of the other?

They are the same now. Historically there was a difference in older versions, but meanwhile they all work the same. Thus the _v2 notation has been deprecated.