In this paper we explore the extent to which the algebraic structure of a monoid M M determines the topologies on M M that are compatible with its multiplication. Specifically we study the notions of automatic continuity; minimal Hausdorff or T 1 T_1 topologies; Polish semigroup topologies; and we formulate a notion of the Zariski topology for monoids and inverse monoids. If M M is a topological monoid such that every homomorphism from M M to a second countable topological monoid N N is continuous, then we say that M M has automatic continuity. We show that many well-known, and extensively studied, monoids have automatic continuity with respect to a natural semigroup topology, namely: the full transformation monoid N N \mathbb {N} ^\mathbb {N} ; the full binary relation monoid B N B_{\mathbb {N}} ; the partial transformation monoid P N P_{\mathbb {N}} ; the symmetric inverse monoid I N I_{\mathbb {N}} ; the monoid Inj ( N ) \operatorname {Inj}(\mathbb {N}) consisting of the injective transformations of N \mathbb {N} ; and the monoid C ( 2 N ) C(2^{\mathbb {N}}) of continuous functions on the Cantor set 2 N 2^{\mathbb {N}} . The monoid N N \mathbb {N} ^\mathbb {N} can be equipped with the product topology, where the natural numbers N \mathbb {N} have the discrete topology; this topology is referred to as the pointwise topology. We show that the pointwise topology on N N \mathbb {N} ^\mathbb {N} , and its analogue on P N P_{\mathbb {N}} , is the unique Polish semigroup topology on these monoids. The compact-open topology is the unique Polish semigroup topology on C ( 2 N ) C(2 ^\mathbb {N}) , and on the monoid C ( [ 0 , 1 ] N ) C([0, 1] ^\mathbb {N}) of continuous functions on the Hilbert cube [ 0 , 1 ] N [0, 1] ^\mathbb {N} . The symmetric inverse monoid I N I_{\mathbb {N}} has at least 3 Polish semigroup topologies, but a unique Polish inverse semigroup topology. The full binary relation monoid B N B_{\mathbb {N}} has no Polish semigroup topologies, nor do the partition monoids. At the other extreme, Inj ( N ) \operatorname {Inj}(\mathbb {N}) and the monoid Surj ( N ) \operatorname {Surj}(\mathbb {N}) of all surjective transformations of N \mathbb {N} each have infinitely many distinct Polish semigroup topologies. We prove that the Zariski topologies on N N \mathbb {N} ^\mathbb {N} , P N P_{\mathbb {N}} , and Inj ( N ) \operatorname {Inj}(\mathbb {N}) coincide with the pointwise topology; and we characterise the Zariski topology on B N B_{\mathbb {N}} . Along the way we provide many additional results relating to the Markov topology, the small index property for monoids, and topological embeddings of semigroups in N N \mathbb {N}^{\mathbb {N}} and inverse monoids in I N I_{\mathbb {N}} . Finally, the techniques developed in this paper to prove the results about monoids are applied to function clones. In particular, we show that: the full function clone has a unique Polish topology; the Horn clone, the polymorphism clones of the Cantor set and the countably infinite atomless Boolean algebra all have automatic continuity with respect to second countable function clone topologies.