As far as I am aware, all eukaryotic membranes consist of a lipid bilayer. Smooth endoplasmic reticulum (ER) and rough ER are distinguished by the presence of ribosome on the rough ER surface, but are apparently otherwise similar. So what causes ribosomes to associate with the membrane of rough ER but not that of smooth ER. Or do ribosomes convert smooth ER to rough ER by binding to their membranes?
Peptides that are destined to be either secreted or included in the cell membrane have a signal sequence that binds a protein called Signal Recognition Particle (SRP). The SRP will in turn bind to translocons--basically peptide tunnels in the RER membrane. You need to have this interaction between the translocon and the SRP in order to have stable ribosome attachment. That's why you won't have ribosomes attaching to other membranes. After attachment the ribosome will continue translating mRNA through the translocon into the RER lumen.
Now here's where things get a bit dicey. If the resulting structure in the RER lumen is largely hydrophilic then it will stay in the RER lumen where it will later be targeted to wherever it needs to go based on other signal sequences.
However, if there are large stretches of hydrophobic residues, then those don't like to be in the aqueous environment of the ER lumen. Ergo they will incorporate into the RER membrane. Thus they become transmembrane proteins. A good rule of thumb is that if you have 10 hydrophobic residues in a row, then there's a good chance that is going to get incorporated into a membrane.
Once protein transcription is complete the ribosome will no longer be associated with the RER and will re-enter the pool of free ribsomes (ready to pick up a new mRNA).
EDIT: In response to question in comments about why translocons are found in RER and not in other membranes
You can certainly ask the question, but you're getting close to falling into that beautiful genesis of basic science research: something I call the 'why-hole'. I searched around, and I don't think we have a full understanding of membrane organization throughout the cell, though I would defer to any cell biologists who have a better understanding. We do have some idea of the mechanisms. What follows is a stitching together of hypothesis and some facts I was able to find.
It stands to reason that since the translocon is a complex of transmembrane proteins, its parts were at some point synthesized by a ribosome through a previous translocon. That would get it into the RER membrane. Now in order for a piece of membrane (or anything within the ER lumen, for that matter) to get to its final destination it has to have another signal sequence. This signal sequence will be recognized by unique signal recognition protein. This will localize the protein to a part of the RER that has several proteins that will form a vesicle (one of which being clathrin) and a protein attached to it called a v(esicle)-SNARE. Once the vesicle buds off it will go through the cell until its v-SNARE runs into a t(arget)-SNARE. This interaction will ultimately lead to fusion of the vesicle into the target membrane (e.g. lysosome, plasma membrane, etc). I double checked all of my facts here, where you can read more about it.
All of this is to say that if a transmembrane protein doesn't have a signal sequence it won't get targeted for transport through this system and should stay in the endoplasmic reticulum.
At this point it would be good to remind everyone that the ER--both rough and smooth--is a continuous structure with the RER located closer to the nucleus and the SER closer to the cell membrane. So it would be reasonable to ask why translocons stay in the RER and doesn't diffuse into the SER. That's where we get into more emerging science. From what I gather there are many proteins that are involved in the strutrue and organization of the ER. You can look into "the ability of NDPK-B to form microdomains at the membrane level" or reticulon2, but I think there's still a fair amount of work to do in this field. I encourage you to look into these resources, and if this is something that you're interested in consider doing some research. There is some evidence that membrane dysfunction is associated with neuronal disease, so any advances would be well received.
As always, keep asking questions!