Help to understand scaffold's code!

Follwed a Guide at
a scafffold as

   rails generate scaffold Post name:string title:string content:text
                                     The content of app/view/posts/
index.html.erb file are as under

<h1>Listing posts</h1>


<% @posts.each do |post| %>
    <td><%= %></td>
    <td><%= post.title %></td>
    <td><%= post.content %></td>
    <td><%= link_to 'Show', post %></td>
    <td><%= link_to 'Edit', edit_post_path(post) %></td>
    <td><%= link_to 'Destroy', post, :confirm => 'Are you
sure?', :method => :delete %></td>
<% end %>

<br />

<%= link_to 'New Post', new_post_path%>

                           Now look at following line of code,and
please help me to understand it
1) <% @posts.each do |post| %>
is it will execute when at least one post will be created??)

2) <td><%= %></td>
    <td><%= post.title %></td>
    <td><%= post.content %></td>

(is it will get a values from database?)


Look at the code on posts_controller.rb index method

See in app/controller/post_controller.rb file
in that there is a code for index in
def index

when you make any request above function will call first and then goes to index.html.erb file.
Now you can explore more things by tracing the code.