Do continuous maps necessarily preserve topological invariants? Or is it necessary for the maps to be homeomorphisms? Are there simple examples where continuous maps do not preserve these invariants?
Note that there is a continuous map from any topological space to a single point, so no invariant that can distinguish non-points from points will be preserved in general. A homeomorphism will preserve every invariant (by the definition of invariant, as pointed out by lhf).
However, many topological invariants (such as the fundamental group and homology) are preserved by homotopy equivalences, which are not homeomorphisms in general, so there is a middle ground.
A topological invariant is usually defined as a property preserved under homeomorphisms.
There are topological properties, such as compactness and connectedness, that are preserved even under continuous functions.
Not all topological properties are preserved under continuous functions. For instance, the number of connected components (the simplest homology) is a topological invariant that is not preserved in general under continuous functions.