Only when the air temperature is less than the ground temperature. On average, yes, air source is slightly less efficient than ground source, but the initial cost of ground source is so much higher that you will not make up the difference in the lifetime of the pump. Air source is fine.
Also, is it possible for air pump to heat a liquid in pipes?
Yes.
I mean can I have air pump that provides heating to the floor?
Yes. This is generally considered the best way to do it as the water does not need to be as hot as with conventional radiators, so it is somewhat more efficient. However, conventional low temperature radiators work fine, too.
I know air pumps only as air conditioners and they just blew warm air around, which is not that comfortable if you are just where the warm wind blows :)
To each their own. I grew up with forced air heating and prefer it to radiated heat.