<% %>の場合は何も表示されないので、変数の定義などに用います。
一方<%= %>の場合では、Rubyコードの中身が表示されるため、変数の値などを実際にページ内に表示したい場合に用います。
例
<% post1 = "今日からRailsの勉強するよー!" %>
<% post2 = "投稿一覧ページ作成中!" %>
<div class="">
<div class="">
<div class="">
<%= post1 %>
//今日からRailsの勉強するよー!を表示
</div>
<div class="">
<%= post2 %>
//投稿一覧ページ作成中!を表示
</div>
</div>
</div>