I'm guessing that the answer to this question is well-known, but I'm struggling to find anything to help me.


Let $X,Y$ be compact manifolds of dimension $n,m$ respectively. Let $f:X \to Y$ be a smooth map. Then one can consider the graph $\Delta\_f$ of $f$ as a cycle in $X \times Y$. 


Firstly what is "known" about $\Delta\_f$ considered as a homology class? (I appreciate that this is a little vague). There might need to be some extra conditions placed of $f$, as clearly if for example $f$ maps everything to a point then there is nothing to be said.


Secondly (and related to the first question), suppose that $n=m$, and $f$ is an immersion. Then the self intersection $\Delta\_f^2$of $\Delta\_f$ with itself is well-defined. Is there a simple expression for this in terms of the basic properties of $f$? 



Graphs of maps between manifolds as cycles and intersection theory
A little late to the party, but here's what I think happens.


I will assume $X$ is closed and oriented, with fundamental class $[X]\in H\_n(X)$. I will also assume we're using field coefficients (or $X$ has torsion-free homology) so there is an isomorphism $H\_\*(X)\otimes H\_\*(X)\cong H\_\*(X\times X)$ given by cross product.


Let $F\colon X\to X\times Y$ be the map $F(x)=(x,f(x))$. Then $\Delta\_f=F\_\*[X]\in H\_n(X\times Y)$. Note that there is a factorisation $F=(1\times f)\circ d$, where $d\colon X\to X\times X$ is the diagonal map. 


Under our assumptions, a basis $\{b\_i\}\_{i\in I}$ for $H\_\*(X)$ has a Poincaré dual basis $\{b\_i'\}$, and the diagonal class is given by $d\_\*[X]=\sum\_{i\in I} b\_i\times b\_i'$ (see Chapter 11 of Milnor and Stasheff). Hence
$$
\Delta\_f = (1\times f)\_\*d\_\*[X] = \sum\_{i\in I} b\_i \times f\_\*(b\_i').
$$
So it's not enough to know just the homology class represented by $f$, you have to know the whole induced homology homomorphism.


With regards your second question, as noted in the comments, $f$ is a covering map. The map $F\colon X\to X\times Y$ is an embedding, whose normal bundle is isomorphic to the tangent bundle of $X$. So this self-intersection number $\Delta\_f^2$ should just be the Euler characteristic of $X$. 


