A Gemfile is a file where you list the gems your Ruby project needs. You start by specifying the source, usually 'https://rubygems.org'. Then you add gems with their versions using the gem keyword. The '~>' symbol means compatible versions starting from the given version. After saving the Gemfile, you run 'bundle install' to download and install the gems. Bundler creates a Gemfile.lock file to lock the exact versions installed. This ensures your project uses the same gem versions every time. Without running 'bundle install', the gems are not installed and cannot be used. The process ends when all gems are installed and ready for your project.