We have a fixed point theorem which says that :
Let $X$ be a compact polyhedron, $f:X\rightarrow X$ be a continuous map. If $L(f)\neq 0$ then $f$ must have a fixed point. (Lefschetz number is denoted by $L(f)$)
Now, i would like to know if there is any method to compute this $L(f)$ for any map.
There is a result which says for a nullhomotopic map $L(f)\neq 0$..
Can some one suggest how to proceed for this kind of computation.
In general it really depends on how well you understand $f$ and its action on the cohomology of $X$. Here are two nice special cases where you only need to understand the action of $f$ on a single cohomology group and then everything else is determined by the cup product.
Tori
Let $\Gamma$ be a lattice in $\mathbb{R}^n$. (You can take $\Gamma = \mathbb{Z}^n$ if you want to be boring, but it's actually important that everything I'm about to say will be functorial in $\Gamma$.) Then $\mathbb{R}^n/\Gamma$ is a torus. Its cohomology (over $\mathbb{Z}$) is an exterior algebra
$$H^{\bullet}(\mathbb{R}^n/\Gamma) \cong \Lambda^{\bullet}(H^1(\mathbb{R}^n/\Gamma))$$
on $H^1$, so to understand the action of a map $f : \mathbb{R}^n/\Gamma \to \mathbb{R}^n/\Gamma$ on cohomology it suffices to understand the action of $f$ on $H^1$. Functorially in $\Gamma$,
$$H_1(\mathbb{R}^n/\Gamma) \cong \Gamma$$
and hence $H^1$ can be identified with the dual lattice $\Gamma^{\vee} = \text{Hom}(\Gamma, \mathbb{Z})$. $f$ acts on $H_1$ by some linear map
$$H_1(f) : \Gamma \to \Gamma$$
or, after picking a basis of $\Gamma$, by some element of $\text{GL}_n(\mathbb{Z})$, and then everything else is determined by that action as follows. The action of $f$ on $H^k$ is the $k^{th}$ exterior power of the action of $f$ on $H^1$, and hence its trace is the $k^{th}$ coefficient of the characteristic polynomial of $H^1(f)$ (up to sign), which is the same as the characteristic polynomial of $H_1(f)$. From here you can compute that the Lefschetz number of $f$ is
$$\boxed{ L(f) = \det(1 - H^1(f)) }.$$
Now for simplicity fix $\Gamma = \mathbb{Z}^n$. Any element of $\text{GL}_n(\mathbb{Z})$ in fact acts on $\mathbb{R}^n/\mathbb{Z}^n$ by matrix multiplication in the obvious way with induced action on $H_1$ given by the same element, and this remains true if in addition we translate by something. Applying the Lefschetz fixed point theorem we get the following.
This is an exercise to show directly, without the Lefschetz fixed point theorem.
Complex projective spaces
Complex projective space $\mathbb{CP}^{n-1}$ has cohomology
$$H^{\bullet}(\mathbb{CP}^{n-1}) \cong \mathbb{Z}[\alpha]/\alpha^n$$
where $\alpha$ has degree $2$. If $f : \mathbb{CP}^{n-1} \to \mathbb{CP}^{n-1}$ is a map, then it acts on $H^2 \cong \mathbb{Z} \alpha$ by multiplication by some integer $d$, and then it necessarily acts on $H^{2k} \cong \mathbb{Z} \alpha^k$ by multiplication by $d^k$. We find that the Lefschetz trace of $f$ is
$$\boxed{ L(f) = 1 + d + d^2 + \dots + d^{n-1} = \frac{d^n - 1}{d - 1} }$$
(or $n$, if $d = 1$). In particular, when $n$ is odd this is never zero. So applying the Lefschetz fixed point theorem we get the following.
For all $n$ we can at least say that if $d = 0$ (in particular, if $f$ is nullhomotopic) then $L(f) = 1$, although as John mentions in the comments this is true of any nullhomotopic map acting on a connected space. A particularly interesting family of examples of nullhomotopic maps is given by the action of any $g \in \text{GL}_n(\mathbb{C})$ (which is connected). A fixed point of such a map $g$ acting on projective space is precisely an eigenvector, and so applying the Lefschetz fixed point theorem we get the following.
This is equivalent to the fundamental theorem of algebra!
Moreover, trying to imitate this proof for the real projective spaces tells you exactly how strong the statement you can make over $\mathbb{R}$ is: the way the cohomology computation works out (do it over $\mathbb{Q}$ for simplicity) we get that every $g \in \text{GL}_n(\mathbb{R})$ has a real eigenvector (with a real eigenvalue) iff $n$ is odd. Hence a real polynomial of odd degree has a real root (which we also could've proven using the IVT), but a real polynomial of even degree doesn't necessarily, exactly as expected. (Actually, if you're more careful Lefschetz says something a bit stronger than this: it'll say that a real polynomial of even degree has a real root if its constant coefficient is negative, which also follows from the IVT.)