You can use them in any template, but mostly it usefull in templates that being used on different pages (user_loginform.html or header.html for example)
You can use these tags to display/hide part of the template based on which page is opened.
For example add into user_loginform.html
{if details}<p>this text will only be visible for guests when they visit details.php page</p>{endif details}
{ifno categories}<p>this text will be visible for guests on ALL pages EXCEPT on categories.php page</p>{endifno categories}