The simplest explanation is that we don't know. As far as I know, this isn't addressed in canon or through any (direct) Word of God answer.
It depends on if we consider BTTF a "single timeline universe" or a "multiple timeline universe".
Consider that "Marty-A" is the Marty we follow through the film and "Marty-B" is the Marty we see get into the DeLorean at the end (from the alternate 1985). I'm going to make the case there is reasonable evidence to suggest that Marty-A and Marty-B are in fact the same person if we consider BTTF a "single timeline universe".
In this case, there is simply no where for Marty-B to go - upon returning to the past, he would end up running into Marty-A anyway.
Therefore I would suggest that either:
Marty-B returns to the past with memories of the alternate 1985 timeline. He still ends up doing pretty much all of the same stuff that Marty-A does, including messing up his parents meeting and reuniting them (or maybe not). He could still become "Marty-A" at the end of the film. But there is a problem with this - as we've seen, Marty-A doesn't remember the altered timeline (at least not right away). So alternatively:
Marty-B returns back to a yet a different 1985 than Marty-A. Now we have to consider at least 6 timelines (3 in 1955, 3 in 1985) and possibly infinite if the loop just keeps repeating. In which case the answer to what happens to Marty-B is he ends up in another timeline. So finally:
Marty-B never travels to the past. The only Marty we ever see is Marty-A at two different points. This is the simplest explanation and seems to be supported by the fact that the timeline can "change" around people, as seen in BTTF2 and BTTF3.
Up until we find out Doc is alive, or Marty-A wakes in his house, there isn't much indication that he's in an altered timeline, with one big exception - Lone Pine Mall. But we know printed text (like matchsticks and newspaper) can easily change. Ergo, the mall could still have been named "Twin Pines Mall" when Marty-B meets Doc at the end of the film. At some point after arriving at the mall, but before Marty-A shows up (perhaps at the moment Marty-A arrived), the sign changed (off camera) to Lone Pine Mall. Marty-B (really Marty-A) never notices as he's not looking at the sign.
I suspect living in an alternated timeline long enough you would eventually gain "corrected" memories (Marty A would start to remember the Marty B alternate 1985) - but that's just speculation. After all, 1885 Doc doesn't remember sending Marty back, although it's possible it just hasn't been long enough.
The first time you watch the film, in my mind at least, there isn't intended to be any doubt you're watching the original Marty before you discover the "surprise " - Doc is still alive, and (later) the timeline has been changed.