When you want to write the code in the .aspx page then we use the code block.
Because aspx page is mark up page and it contain everything in the tag <> format , we have to use the <% ... %> sybmbols to write the code in the .asxp page
Its called code render block.
Hope you get it