if you name the layout file application.html.erb, then it will be the default layout file. If you specify a layout file by the same name of your controller, that will override the default layout.
From Rails Guides:
To find the current layout, Rails
first looks for a file in
app/views/layouts with the same base
name as the controller. For example,
rendering actions from the
PhotosController class will use
app/views/layouts/photos.html.erb (or
app/views/layouts/photos.builder). If
there is no such controller-specific
layout, Rails will use
app/views/layouts/application.html.erb
or
app/views/layouts/application.builder.
If there is no .erb layout, Rails will
use a .builder layout if one exists.
Rails also provides several ways to
more precisely assign specific layouts
to individual controllers and actions.
source: http://guides.rails.info/layouts_and_rendering.html
EDIT:
I should add that you can specify any layout to be your default in the Application Controller:
class ApplicationController < ActionController::Base
layout 'some_layout_name'
end
And that will override name matching that rails does automatically.
I hope this helps!