Ones who engaged in up-close fighting and smashing aside defenses and enemy soldiers were known as 'Attack Trolls'. This is especially true in the movies, where they fill a variety of specific functions, including drummers and pushing siege towers into position.
In any event, come the War of the Ring, the Olog-hai were used by him extensively in his campaigns against Gondor and elsewhere (such as in Mirkwood). It is not entirely clear when or how the Olog-hai first came into being, but presumably they were created by Sauron in some way (possibly by infusing pre-existing Trolls with enough his malice or power to make them stronger).