If f is continuous at every point then f is continuous.
Assume f is continuous and fix any open set in T, and let p be any point in the preimage, with q = f(p). Now q has an open set around it, hence the preimage includes an open set about p. The entire preimage is covered by open sets, and is open. Thus we have an equivalent definition; f is continuous if the preimage of every open set in T is open in S.
Clearly the identity function is always continuous.
Yet another definition is couched in terms of closed sets; f is continuous if the preimage of every closed set in T is closed in S. We can't (conveniently) use closed sets to define continuity at a point.
Restrict the function to a subspace of S and it remains continuous, since the restriction can only create more open sets in the domain.
An open set in g(f()) pulls back to an open set in f(), which pulls back to an open set in the domain. Hence the composition of continuous functions is continuous. Also, g(f()) is continuous at p if f is continuous at p and g is continuous at f(p).
Let R be a set in S, with p as its limit or cluster point. Assume f is continuous at p. Every open set about q pulls back to include an open set about p, which contains a point, or infinitely many points from R. These points map forward into the open set about q. Thus the image of a limit or cluster point is the limit or cluster point of the image. As a corollary, the image of the closure of R is contained in the closure of the image of R.