Yes, you can use Ruby for desktop applications (if it's a good choice is another question and may depend on the project). In addition to Ruby itself you will need some kind of widget toolkit or application framework that allows you to create windows and other GUI elements for the underlying operating system.
For Ruby exist bindings to several such toolkits like WxRuby to WxWidgets, FXRuby to FOX or QtRuby to the Qt framework (and a few more like ruby-gnome, ruby-tk, shoesrb, limelight, visual ruby). Or you can use JRuby and then use mostly anything available for Java.
Frameworks: there are many, sometimes quite different from each other. But as a general rule they are a combination of libraries and rules and boilerplate codes that make a certain complex task easier. This task may be something like a web site or a desktop application.
To start with for such a task you will need many libraries for the underlying tasks. You will use some database library to interface the database, some gui library to create windows, menus, buttons and other widgets. There are many ways to do this and many optional development patterns. MVC (Model View Controller) is quite fashionable, especially in web development with its special requirements.
So lets talk about Rails again. You need a model (database & business rules), a controller (take incoming request, gather data, process data and then tell the view to render the response web page) and the view (actually generating the html).
Many libraries are there to help with that and a lot of decisions to be made about how to organize your classes and file structure. Rails gives you a lot of defaults for that that work for a lot of typical projects.
The whole framework thing is a kind of project scaffolding that you than fill with your own code. If you start a new Rails project you have already have a database connection in place and some basic html rendering where otherwise you would have to write hundreds of lines of code to even get started.