Both your first and second descriptions. But reverse front and rear. The motor goes on the front to alllow more energy capture from regenerative braking.
There are parallel and series hybrids meaning the motor generator can be in series with the engine or in parallel. The entire driveline is computer controlled to blend both systems to work as one.
Pretty much the standard way to do FWD hybrids. But, it can be a bit of a packaging headache!
You really need the motor generator on the front wheels since they create 70+ % of the stopping power for regen capture. That is the primary way you get savings from hybrids in the city cycle. The stop-and-go cycle pushes charge back into the battery for later use to accelerate the car again. It makes adding AWD to a FWD car very easy by adding a motor to the rear but you don’t get much regen from it. Flip it around, like the mid-engine Corvette E-Ray and you get the best of both worlds… AWD and great regen braking.
Would have been a MAJOR packaging nightmare (and likely impossible) to make a hybrid AWD Mustang GT. But the Mach E is full EV (and NOT a Mustang!!) because Ford wanted to show they could do it.
That was my thought, just no room in the front end of a real Mustang. The E-Ray is around $115,000. Another car to add to my “if I win the Powerball” list.
It appears my question was too general to really answer. How it works varies a lot design to design.
Maybe I should ask this more basic question: When the electric motor is helping the gasoline motor power the car down the road, what is the physical connection between the electric motor and the crankshaft?
Chain, Gears & clutch system between the electric motor shaft and the crankshaft, running in an oil bath? Like a timing chain?
An external rubber belt with pulley’s, tensioners, and clutches? Like a timing belt, only between the crankshaft and the electric motor shaft?