This could be a broken belt or worn brushes, the machine we are looking at is a Bosch Siemens but other makes will be similar. First disconnect and pull the machine out from the wall, there could be an access panel on the rear to check the belt, if not turn washing machine onto its side, be prepared for some water to leak out.
Looking into this machine we can see that the belt is OK, so we need to remove the motor to check the brushes.
The motor is held with 2 bolts and an electrical plug with plastic cover, this is held in place with a cable tie, remove the drive belt first, just turn drum while pulling belt to one side of large drum pulley.
The brushes are easy but a fiddle to fit, first remove the spade terminal, there is a small catch that has to be lifted up before the terminal will side off see picture.
After terminal has been removed the retaining blade can be moved to line up with the 2 slots, it can then be removed from brush carrier complete with brush, as you from picture they are much worn.
If the commutator is a little burnt, I like to give it a clean up with some fine glass paper and then either clean with compressed air or vacuum cleaner, the brushes are at an angle to the commutator so be sure to fit them the correct way round see picture.
After refitting the motor, the belt can be refitted, first fit it around the motor pulley then turn the drum while gliding the belt onto the large drum pulley.