Hi Adhitya,
Including the code in template means, we can include the flow logic (program lines) above to the defined template and write the that we want (change the variable values etc), and display those values in template text elements. If the code is single time execution code then you can write the same code in Initialization. If the template is placed with in the loop then we can include our flow logic in that loop and change the code/values accordingly and show in the template. There are the possible ways to include the flow logic. May I know what exactly you are looking for.