How should one think about pushforward in cohomology? Suppose f:X→Y. If I decorate that first sentence with appropriate adjectives, then I get a pushforward map in cohomology H*(X)→H*(Y).
For example, suppose that X and Y are oriented manifolds, and f is a submersion. Then such a pushforward map exists. In the de Rham picture, we can see this as integrating a form over fibres. In the sheaf cohomology picture, we can see this via the explication of the exceptional inverse image functor.
The question is how else can we think of this pushforward map. I'd be particularly interested in an answer from the algebraic topology point of view, because I'm hoping that such an answer would eludicate the appropriate level of generality in which a pushforward in cohomology exists (perhaps not only answering the question of for which maps f, but also answering the question of in which cohomology theories can we carry out such a construction).
 A: Parallel to the OP's two examples, if a cohomology class is defined through intersection with a submanifold (or subvariety with fundamental class in locally finite homology) then the pushforward is defined through intersection with the image of this subvariety. Note how immediate it is to see the change in codimension ( while codimension is constant when taking preimage, which corresponds to the natural map).
As others have said, collapse maps can be used to define pushforwards in general. But having models for pushforwards counts towards understanding a particular cohomology theory geometrically. So for example if you can find a good model for the pushforward of tmf then "you'll win a prize"
A: May and Sigurdsson developed a general theory for transfer maps in (co)homology in their work on parametrized homotopy theory. Briefly, they view transfer maps as arising from traces of identity morphisms in the symmetric monoidal category of "spectra over a base $B$.'' A brief introduction that ignores the (substantial) technical details is given in the first half of these beamer slides.
A: In the case where $X,Y$ are smooth oriented (compact) manifolds, you may do this using currents. 
Indeed, currents are continuous linear forms on the space of (compactly supportly) smooth differential forms.
There is a natural way to push forward currents (by duality with the pull-back of smooth forms). Furthermore, the De Rham cohomology for currents is (naturally) isomorphic to the one of smooth forms. Therefore, you can push forward a smooth class considering it a current class, and using then the previous natural isomorphism.
Moreover, you have the projection formula: $\alpha, \beta$ are forms with appropriate degree, then $f_{\star} (f^{\star} \alpha \cup \beta) = (\alpha \cup f_{\star} \beta)$. 
To sum up, the use of currents allows you to consider always duality on cohomology and not duality between homology and cohomology. 
A: If $X$ and $Y$ are closed manifolds, then you can define the pushforward using Poincaré duality, by pre- and post- composing the map $f_\ast\colon H_\ast(X)\to H_\ast(Y)$ with the appropriate duality isomorphisms. If the manifolds are not compact, then use compactly supported homology and assume $f$ is proper (inverse images of compact sets are compact).
This assumes your manifolds are oriented with respect to whatever homology theory you are using. More generally, you get a pushforward whenever the map $f\colon X\to Y$ is oriented (which roughly amounts to an orientation on the stable normal bundle of $f$) and proper.
I think a good place to read about this is the book "Cohomology Theories" by E. Dyer. 
There are other ways to define these pushforward, or Umkehr, maps. You'll find an axiomatic treatment and a survey of the different approaches in this paper of Ralph Cohen and John Klein.
A: To expand on Mark's answer a bit, a fairly general setup is when your map $f\colon X \to Y$ has a homotopy fiber which is homotopy equivalent to a closed, compact manifold of dimension $n$. You can apply the Pontryagin-Thom construction fiberwise to get a map of spectra
$$
\Sigma^\infty Y_+ \to X^{\nu},
$$
where $X^{\nu}$ denotes the Thom spectrum of the stable normal bundle along the fibers of $f$. This bundle has virtual dimension $-n$. This is the umkehr map Mark mentioned. Now if you have a cohomology theory $E$ for which the fibers are $E$-orientable, you get a Thom isomorphism $E^*(X^\nu) \cong E^{\ast-n}(X_+)$, and composing with the Umkehr map gives you the pushforward in this cohomology theory. For instance, for mod-2 singular cohomology the orientability condition is vacuous, for integral cohomology the fibers of $f$ have to be coherently orientable manifolds, and for real $K$-theory the fibers have to have coherent spin structures.
A: Here is another interpretation of the wrong way map in cohomology.
Let $f:X\to Y$ be a proper continuous map of "nice" topological spaces (say, of the form "a finite CW complex minus a subcomplex"). First, recall that the usual pullback map $H^\ast(Y,\mathbb{Z})\to H^\ast (X,\mathbb{Z})$ can be constructed as follows: we identify $H^i(Y,\mathbb{Z})$ with $Hom(\underline{\mathbb{Z}}_Y,\underline{\mathbb{Z}}_Y[i])$. Here $\underline{\mathbb{Z}}_Y$ is the constant sheaf on $Y$ and $Hom$ is taken in the bounded derived category. Then we apply the pullback functor $f^{-1}$ and use the fact that the pullback of the constant sheaf is constant.
Something similar can be done if we are looking for a map in the opposite direction. Namely, let us identify $H^i(X,\mathbb{Z})$ with $Hom(\underline{\mathbb{Z}}_X,\underline{\mathbb{Z}}_X[i])$.
Applying the (derived) direct image functor we get a map from $H^i(X,\mathbb{Z})$ to $Hom(f_{\ast}\underline{\mathbb{Z}}_X,f_{\ast}\underline{\mathbb{Z}}_X[i])$.
Moreover, there is a canonical map from $\underline{\mathbb{Z}}_Y$ to $f_\ast f^{-1}\underline{\mathbb{Z}}_Y=f_\ast \underline{\mathbb{Z}}_X$. So we get a map from $H^i(X,\mathbb{Z})$ to $H^i(Y,f_\ast\underline{\mathbb{Z}}_X)$ and the problem is to construct a map from $f_\ast\underline{\mathbb{Z}}_X$ to $\underline{\mathbb{Z}}_Y$ or some shift of it.
In some particular cases such maps indeed exist. For instance, if $X$ and $Y$ are smooth orientable manifolds of dimensions $n$ and $m$, then we can take the map $\underline{\mathbb{Z}}_Y\to f_\ast \underline{\mathbb{Z}}_X$ and dualize it. We get a map $Df_\ast \underline{\mathbb{Z}}_X\to D\underline{\mathbb{Z}}_Y=\underline{\mathbb{Z}}_Y[m]$. But since we assume $f$ proper, we have $Df_\ast \underline{\mathbb{Z}}_X=f_\ast D\underline{\mathbb{Z}}_X=f_\ast \underline{\mathbb{Z}}_X[n]$, which gives a map $f_\ast\underline{\mathbb{Z}}_X\to \underline{\mathbb{Z}}_Y[m-n]$, which gives a map $H^i(X,\mathbb{Z})\to H^{i+m-n}(Y,\mathbb{Z})$. This is, of course, the map "take the Poincar\'e dual, push forward and take the Poincar\'e dual again".
Another case is when $f$ is a locally trivial fibration with fiber a smooth compact manifold of dimension $k$ (or more generally, a topological submersion). Then, using the adjunction $Hom (f_\ast\underline{\mathbb{Z}}_X,\underline{\mathbb{Z}}_Y)=Hom(\underline{\mathbb{Z}}_X,f^!\underline{\mathbb{Z}}_Y)$, and using the fact that $f^!\underline{\mathbb{Z}}_Y=\underline{\mathbb{Z}}_X[k]$, we see that there is a map $f_\ast\underline{\mathbb{Z}}_X\to \underline{\mathbb{Z}}_Y[-k]$, which gives a map $H^i(X,\mathbb{Z})\to H^{i-k}(Y,\mathbb{Z})$. This is the integration along the fibers map.
A: 
not only answering the question of for which maps f, but also answering the question of in which cohomology theories can we carry out such a construction

Both questions are answered in the book by Buoncristiano, Rourke, and Sanderson, "A geometric approach to homology theory" (available at google books; start from Chapter 2). The answer is as follows: The pushforward $f_!:h^\ast(X)\to h^{\ast+n}(Y)$ in the cohomology theory $h^\ast$ (as well as the pullback in the dual homology theory) is defined whenever the map $f:X\to Y$ itself represents (in a sense to be discussed in a moment) a class $[f]\in h^n(Y)$. The definition of $f_!$ is simply by composition: $f_!([g])=[fg]$. (Here $n$ can be positive. When $n$ is negative and the cohomology is ordinary, $[f]=0$ whenever $[f]$ is defined, but it is still meaningful to ask whether $[f]$ is defined for a given $f$.)
Now what do I mean by a representative? Well, an ordinary cohomology class in $H^1(X)\simeq [X,S^1]$, where $X$ is a polyhedron, can be represented (not only by a cochain, but also) by a transversal point-inverse $Z$ of a PL map $X\to S^1$, viewed as an embedding $Z\to X$. Two such representatives are equivalent if they cobound a transversal point-inverse of a PL homotopy $X\times I\to S^1$, viewed as a map $W\to X\times I$. (Here "transversal" means just that the point is taken in the interior of a $1$-simplex of a triangulation of $S^1$ which makes the map simplicial.) It turns out that this description of ordinary $1$-cohomology generalizes in an elegant way to arbitrary dimensions and arbitrary cohomology theories, which was done in the B-R-S book. Other monographs based upon this geometric view of cohomology include Fenn's "Techniques of geometric topology" and Kreck's Differential Algebraic Topology and these may function as an introductory reading for the B-R-S book (in case you find it terse; another option is Rourke's ICM lecture). 
Here are some details. In the case of the unoriented PL cobordism theory (it is about the simplest theory from this viewpoint), the representatives of cobordism classes are what B-R-S call "mock bundles"; I prefer calling them "comanifolds". An $n$-comanifold (where $n$ is any integer, positive or not) is a PL map of a polyhedron into a simplicial complex such that the preimage of every $i$-simplex is a PL $(i-n)$-manifold with boundary, and moreover its boundary equals the preimage of the boundary of the $i$-simplex. If you think about embedded $1$-comanifolds in a three-page book, for instance, you'll easily see that whenever one intersects the binding, it has to look locally like a triod orthogonal to the binding. In fact, by a variant of the Pontryagin-Thom construction, a co-oriented embedded $1$-comanifold in a polyhedron $X$ is just a transversal point-inverse of a map $X\to S^1$. In general, co-oriented (not necessarily embedded) comanifolds represent oriented PL cobordism classes. 
The pushforward $f_!$ in ordinary integral cohomology is defined for every representative $f$ of an ordinary cohomology class, that is for a co-oriented comanifold with codimension two singularities. Note that these are a lot more general than bundles with a manifold fiber; in particular, every PL map between two PL manifolds 
(of either positive or negative codimension $n$) is included, after a small perturbation
(this is proved in B-R-S). Admittedly, these maps include not all maps whose homotopy fiber is homotopically a manifold, but in practice those can often be reduced to bundles with a manifold fiber. The pushforward $f_!$ in stable cohomotopy is defined for $f$ a framed comanifold. Etc. Everything generalizes straightforwardly to equivariant (including representation-graded) theories. Unfortunately the description of representatives is a lot more complex in the case of $K$-theory (complex, say). 
A: As Tilman said, a Pontrjagin-Thom construction can be used to define umkehr maps in all generalized cohomology theories $E$, provided that the stable normal bundle is $E$-oriented.
Sufficient conditions for the existence of PT-constructions are:


*

*$f:X \to Y$ is a proper map of (possibly noncompact) manifolds.

*$f:X \to Y$ is a bundle with fibre $M$ and structure group $Diff(M)$. $M$ needs to be a closed manifold.
One can lax the smoothness assumption considerably, and the appropriate tool in this situation is the Leray-Serre spectral sequence.
Assume that $f:X \to Y$ is a fibration and the fibres are homotopy equivalent to closed oriented $n$-manifolds. Assume moreover (for simplicity) that the local coefficient system $H^n (X/Y)$ (by which I mean the $n$th cohomology of the fibres) is constant and that the fibres are connected.
Then you get a map $$H^{n+k}(X) \to E_\infty^{k,n} \subset E^{k,n}_{2} = H^k(Y)$$ and this is your wrong-way map.
The most elegant way to show that all the different constructions coincide in their common domain of definition (smooth bundles over manifolds), it might be best to characterize the wrong-way maps by a short list of axioms:


*

*$f_! : H^{\ast}(X) \to H^{\ast}(Y)$ is a homomorphism of $H^{\ast}(Y)$-modules

*$f_! $ is natural with respect to pullbacks of bundles

*$f_!$ is normalized, i.e. if $Y$ is a point, then $f_!$ is evaluation against the fundamental class.


It is not too difficult to show that these axioms force $f_!$ to coincide with the spectral-sequence definition. 
