Yes, that’s exactly what you do. Download or obtain an area of interest (many formats are available) as an .osm file and then process it using a Java program called mkgmap which, with the help of optional style sheets, will create a Garmin .img file that can then be read by your device.
If you want to create maps that involve large areas, you might have to resort to another program called Splitter that, as the name suggests, splits the data file into chunks that mkgmap can handle in a preprocessing step. Start by selecting a small area from the main OSM site: http://www.openstreetmap.org/ so you don’t have to resort to Splitter. That will come along later.
At http://www.openstreetmap.org/, pan to your area of interest and click the Export button. Once you’ve done that click on Manually Select a Different Area and adjust the bounding box until you’re satisfied. Then click on the Overpass Api link to begin your download. The data will download as map.osm (or some other name of your choosing) which can be processed with mkgmap.
This is the way I obtain data for my maps but there are lots of other options.