Is work equal to energy? In my textbook, there is written that:

Done work = spent energy

Suppose I am riding a motorcycle. I start my journey from a place and then going to various places I come back to the exact point(I never stopped in my journey). So my displacement is $0$, and the work done by me is also $0$. 
But in my journey I have combusted fuel and spent energy and that energy is not $0$. So is my textbook wrong or I am wrong?
 A: A better wording is:

Done work = useful energy spent

The thing is that it is easy to waste energy. I can easily stand and push on a wall for a whole day and waste my effort while spending large amounts of energy on producing the force I push with. No useful work is done. None of the energy I spend goes into useful energy.
In your case, you can easily promise a delivery job done, but if you drive around and put the package back where you started, then noone would come and tell you that you did any useful work. You just wasted your fuel and time and effort. All that energy spent is lost as heat or other things; it is no spent as work done on the package.
But if I carry a heavy block up the stairs then I do some useful work - I move something somewhere else. My effort is not wasted. Sure, there is still a lot of heat generated, which is energy not spent on lifting the stone. That heat is wasted and did not help to do the work. The amount of useful work I did was the amount of energy needed to lift the block - any other energy spent is wasted and was not useful.
This is the idea of that sentence. You must supply exactly that amount of energy needed as work. If you apply any more, then... it is wasted. That's an issue with how the machine (or my body) produces the force needed. Another "machine" might be more efficient in producing the necessary force with less waste energy. 
A: The definition of $W=Fx$ only works in some cases. The actual definition of work is
$$W=\int \vec F\cdot d\vec x=\int F\cos\theta\ dx$$
Here $d\vec x$ is a tiny displacement vector and $\theta$ the angle between the force and displacement. You can approximate this formula by taking small steps and summing the total work.
$$W\approx Fx_1+Fx_2\dots$$
In your case $F$ would be some friction force working in the opposite direction to $dx$, but because you only consider one displacement (beginning to end) your approximation of the work done is very bad. In fact it is zero. If you subdivide the path in smaller segments you will get work that isn't zero. As an example you could calculate the work done by a biker riding along a perfect square with sides 1. Considering each side seperately the work done on the biker amounts to $W=4\cdot F_{friction}$ instead of zero.
Energy always goes somewhere, it is never lost. Sometimes it is hard to tell where it goes. If you are pushing against a wall without moving it seems like the energy is lost because you aren't moving, but the proteins inside your muscles are moving and converting chemical energy to heat.
A: Yes, work is done when you come back to the staring point, given your scenario. In this case work is done in overcoming friction, air resistance, generating heat, etc. When we say that no work is done when the displacement is zero, we think of the ideal scenario where there is no friction and air drag. Which is true. All things considered, if we stick to the ideal case, your work done is zero.
