"Golem" is a generic term for any magical devices which are able to move themselves or parts of themselves under their own power. Golems range in size from tiny golem watches owned by the wealthy (which are much more accurate than clockwork watches, and which don't have to be rewinded) to automated looms used in factories, railroad coaches pulling trains, and the vast siege engines owned by the League of Armach.
In general, golems are nearly mindless, and what little consciousness they have are small wisps of awareness spontaneously generated by and summoned from the Astral Plane and bound into the body of the golem. They are able to follow simple commands, but nothing that requires creativity or abstract thought. It is possible to imbue golems with greater intelligence, but requires transferring the soul of a living creature into it. Animals almost invariably go mad, and the souls of humans and other sapient races rarely fare better. Best for this purpose are elementals which are ritually bound to the owner, although even they might become somewhat resentful of their situation and (if they are smart enough) interpret their orders creatively in order to twist their spirits. Binding demons and devils into golem bodies is certainly possible, although there is no good reason for doing so. This has not stopped people from testing out a staggeringly large number of bad reasons, though…
While golems are increasingly common, they remain highly expensive and most people will never be able to afford one. In industry and commerce, they tend to be used where their high strength is needed, but it is often more cost-effective to employ a few dozen human workers than to commission a single golem if no high strength is required, and even processes that use golems are rarely done entirely by golems. For example, while golems are used for digging new canals, they are mainly used for loosening up the earth and breaking down stone - it is still cheaper to hire living workers to carry the debris away, even if each worker can carry much less than a single golem.
Beyond that, using golems is a status symbol - a show of power and prestige. For example, the headquarters of a bank will almost certainly use golem guards - they are powerful, look intimidating, and impress the customers (and the bank might also use golem-powered elevators and other golem-powered amenities). In contrast, golems are rarely used for warehouses except those with the most expensive wares, as human (or dwarf, or hobgoblin) guards are cheaper and better able to use their judgment in unforeseen situations. Sometimes, golems are also used for reasons of secrecy - they normally can't talk and are utterly loyal.
The ways a golem can be commanded varies depending on the precise nature of their enchantment. See the discussion of Ownership for further details.