I'm not sure what article you were reading but a Plugin is a peice of PHP Code that is excuted at a certain location (the hook location) by vBulletin. You PHP Code
must go inside a Plugin.
You can use a Plugin to fetch a template, a template is front-end HTML that is displayed to the user. You can use variables in your template that get their values from the PHP code, but you
cannot execute PHP code inside
templates.
Think of it like this (this is just a demonstration of how the system works you do not need to use this code at all!):
PHP Code:
// This is just some default vBulletin PHP file
// This is where you launch your api and get your data
eval('YOUR PLUGIN CODE WILL APPEAR HERE');
echo "YOUR TEMPLATE CODE WILL BE HERE AND IT IS OUTPUTTED TO THE USER";
// End of the Script