Selvage, a rough contraction of "self-edge" is a term used to describe the outer seam of jeans produced in a certain way on certain looms. Most jeans are chain-stitched, which means the denim for the legs was cut from the center of the bolt and needs an additional machine stich to keep it from fraying. Selvage jeans are cut from denim that has a loom-produced edge - it's not in and of itself a strong edge, but it does mean that fewer jeans can be cut from the bolt of denim and usually indicates that the jeans are higher-quality.
Here's a cool history of the looms (from Superfuture):
Back in the day, and even now, bolts of fabric would be moved around a lot causing the edges of the fabric to get all screwed up. The edge of the fabric was then woven differently to prevent it from fraying. It was woven tighter.
Old looms up until the 60's were 28-30 inches wide. That's pretty narrow. So when laying out the pattern pieces for a basic 5 pocket construction the leg pannel would be laid against the long side of the fabric against the selvage. This was simply more economical. When the pant was constructed with an open seam, it would clearly show the selvage. The bigger denim manufacturers would produce denim for different companies. And that's where the signifigance of color comes in. For example Levi's would always use Red, Lee=Yellow, Wrangler=White. Currently the color of the woven threads on the selvage are for fashion only, unless you are one of the original companies using your original color.
In the 70's bigger looms were made and it was more economical for companies to use them. More pattern pieces could be laid down and more jeans constructed. Because the pattern pieces were laid down differently the selvage edge was no longer used.
In the early 80's, the Japanese were very into vintage Americana. As part of this phenomenon. Japanese denim companies bought most of the old looms. And American companies were eager to get rid of the old looms for bigger, more economical looms with larger production capacities. As such today, most funtional vintage looms are in Japan.
Tell me that's not fascinating stuff. That's right - I didn't think you'd be able to. Some fashion nerds cream themselves over suits or ties or fedoras or wingtips or polos or whatever - other than wearing them so they fit well, I don't think I'm interested in any of that stuff a tenth as much as I like jeans.
Update: Here's a picture and description of a denim shuttle loom, from the same thread on Superfuture.
This one is owned by the Okamoto Textile Company, located down in Ibaraichi in Okayama prefecture --- typical of the smaller textile companies catering to independent jeans makers (total number of employees: 10 ! ). They do their own rope-dying and have several shuttle looms to accommodate the small runs required by their customers. The total annual turnover of the company is less than USD 4million