Most stars form in binaries, because it creates a place to put the angular momentum that is otherwise an obstacle to the contraction that gravity attempts to produce. The gravitational environment does not strongly affect single-star evolution, but it does come into play when one star fills its "Roche lobe." That's when mass transfer occurs, and it is called case A if the mass loser is still burning hydrogen in its core (some expansion does occur on the main sequence), it is called case B if the mass loser is climbing the red giant branch for the first time, and case C if the mass loser is climbing the giant branch for the second time. If the star fills its Roche lobe first, it cannot complete this path up the giant branch, and can get stuck as a "subgiant" (luminosity class IV) because any further attempt to expand merely causes mass transfer.
I. Roche lobe overflow
The Roche lobe is the gravitational basin of each star in a binary. It is found by first locating the Lagrange point (L1) between the stars, solving for the effective potential at that point, and finding the equipotential that equals that potential level. Each star in the binary will have as its surface an equipotential surface, but note it is the effective potential, which includes the centrifugal force (which can also be written as the gradient of a type of potential). That's because we have entered the rotating frame that causes both stars to be stationary. The Roche lobe is the last equipotential surface that keeps all the mass attached to one star, any further expansion driven by single-star evolution would cause mass to flow over the L1 point to the other star.
Locating the L1 is simple in principle, but in practice one encounters a quintic equation, so one must use numerical methods to locate it, and its location is often fit by low-order approximations for convenience. The location of the L1 point is important because it relates to at what point the star will overflow its Roche lobe, but the Roche lobe is not a sphere so the usual approach is to parametrize its volume, and let the star evolve like a single star until its volume matches that of the Roche lobe. So what is normally parametrized in a simple way is the volume of the Roche lobe, which of course must be done via a numerical calculation since its analytical form is not derivable.
II. Mass transfer stability
When a star does fill its Roche lobe due to evolutionary pressure, the key question is whether or not the mass trasfer will be stable. To be stable, it requires that a mass dM going across from one star to the other (assuming the transfer is "conservative") causes the mass loser to contract more than its Roche lobe contracts, or expand less than its Roche lobe expands. If the opposite happens, it means that passing mass across will cause more mass to come across, which causes more to come across, and a huge amount of mass can be passed on the dynamical timescale. If it happens that fast, it cannot reach the mass gainer in a thermally relaxed state, so the usual rules of stellar structure will not apply. Instead, the mass will pile up all around the Roche lobe until it creates a common envelope that surrounds both stars. This "common envelope phase" can result in the two stars merging into one, in which case the orbital angular momentum will become spin angular momentum of the resulting star, creating a rapid rotator. Or, the envelope might be ejected, returning the system to a binary, but one with very nonconservative mass transer because of all the lost mass in the ejected envelope.
The way to determine if the transfer will be stable is to compare d ln R / d ln M for the radius R of the Roche lobe to the d ln R / d ln M for the single-star evolution. The single-star evolution connects its change in R due to the lost M based on the stellar structure (so d ln R / d ln M = -1/3 for a white dwarf, or between 0.5 and 1 for a dwarf, etc.), and the d ln R / d ln M for the binary geometry is dominated by the change in the separation between stars, which the Roche radius is proportional to. The change in separation is mostly due to the way a two-body system conserves angular momentum when mass is passed across between the bodies, and we derived in class that d ln a / d ln M = 2q - 2, where q is the ratio of the mass of the gainer to the loser, and the meaning of d ln M is the mass transferred divided by the mass of the mass gainer. Note that a negative result means the separation drops as mass is transferred. If we instead let d ln M mean the fractional mass transfer out of the total mass of both stars, then d ln a / d ln M = 2(q - 1/q). A small correction is made to that for the change in the Roche geometry when mass is passed across, but mostly the Roche radius simply tracks proportionally to the separation a.
III. When mass transfer creates an accretion disk
The stream of mass carries orbital angular momentum per gram, given by the lateral speed at which the L1 point is moving as the system rotates. If one simply takes that angular momentum per gram, and finds the circular orbit around the mass gainer that has that same angular momentum per gram, one finds the circular orbit that mass stream will settle into, forming the outside edge of an accretion disk. If, on the other hand, that radius would be inside the mass gainer surface, then the accretion creates a hot spot directly on the surface of the mass gainer.