In the first way --
<%= form_for(:user, url: users_path) do |f| %>
you will get the exact same form html wise (for example <input name="user[age]" />
)
BUT
When you provide a specific @user object (that you define in the controller) the fields will be filed with the information saved in the @user var.
for example, if I define a @user in the controller and say
@user.age = 5
and than I do a form_for and load put an input for a name it will already fill it with "gilad":
<input name="user[age]" value=5 />
Also, in the first type of form the :url is the url the form will be submitted to.
Hope this helped