A metric space is totally bounded if and only if its completion is compact. A subset of a complete metric space is totally bounded if and only if its closure is compact. A metric space $X$ has the property that its bounded subsets are totally bounded if and only if the completion of $X$ has the property that its closed and bounded subsets are compact, a property sometimes called the Heine-Borel property.
Montel spaces are examples of these.
Here's an open access article by Williamson and Janos you may find interesting. For example, Theorem 1 (which they credit to a 1937 paper of Vaughan) says that a metrizable, $\sigma$-compact, locally compact topological space has a compatible metric with the Heine-Borel property.
It’s a straightforward result that a uniform space $X$ is totally bounded iff every net in $X$ has a Cauchy subnet, and the usual equivalence between nets and filters shows that this is in turn equivalent to the statement that for each filter in $X$ there is a finer Cauchy filter. However, this does not guarantee that every sequence has a Cauchy subsequence. One counterexample is $\beta\omega$: it’s a compact Hausdorff space, so it has a unique compatible uniformity and is both complete and totally bounded in that uniformity, but the sequence $\langle n:n\in\omega\rangle$ has no convergent subsequence.
I’ve not worked much with uniform spaces, but in that context I’ve generally seen precompact used as a synonym of totally bounded. The situation with respect to the other meaning of the term is the same as in metric spaces. If $Y$ is a subspace of a complete uniform space $X$, then $\operatorname{cl}_XY$ is complete; if $Y$ is also totally bounded $-$ which is an inherent property, just as it is for metric spaces $-$ then $\operatorname{cl}_XY$ is totally bounded and therefore compact. Thus, a subset of a complete uniform space is precompact (in this other sense) iff it is totally bounded. This will not be the case in arbitrary uniform spaces, however.
Best Answer
In general, there is no notion of boundedness on a topological space.
Exercise: given a metric space $(X,d)$, show that $D(x,y):=\mbox{min}(1,d(x,y))$ defines a second metric on $X$ which is equivalent to the first one; that is, a subset $U$ of $X$ is open with respect to the first metric if and only if it is open with respect to the second one.
Note that with the second metric, every set is bounded, but the topologies are the same. What this shows is that, in metric spaces, where the notion of boundedness is well-defined, one can show that it is in fact independent of the topology. Boundedness is a property which arises from the metric.
The concept of bornology (although I am not familiar with it) allows you to study boundedness by adding extra structure to your topological space, and what you get is a bornological space.