Apparently, the brushing action itself is the single most important factor in cleaning your teeth. Fluoride in the toothpaste is a useful additive, and this is important for children while their teeth grow, though less so for adults. Although soap is not designed for this purpose it should be reasonably effective in dealing with mouth bacteria. A major ingredient is a mild abrasive such as chalk, which is absent from soap. A soapy chemical such as sodium lauryl sulphate is used and this is the main reason for the inclusion of flavouring agents, usually mint, without which toothpaste tastes pretty foul.
Some pastes also contain antibacterial agents in the stripes.
There is also fluoride, which provides us with the ongoing argument over whether or not it is good for you . . .