What is friction?

Wikipedia defines [friction](https://en.m.wikipedia.org/wiki/Friction) as:

Friction is the force resisting the relative motion of solid surfaces, fluid layers, and material elements sliding against each other.

But forces are relative, so in what reference does friction exists? We normally assume that when we say that a force acts on a body, we mean that the force acts on the body from the frame of the ground.

But then consider a block on the truck, both have the same acceleration with respect to the ground and further assume that surface of both are rough.

[![truck](https://i.stack.imgur.com/Rzye7.jpg)](https://i.stack.imgur.com/Rzye7.jpg)

So in what reference does friction exists in this case? From the respect of ground, there is a force acting on the block, from Newton's laws, in the direction of acceleration. Is this friction force? No, that is the force by which the truck is moving, from this reference I can just regard the block to be part of the truck and there is no need to invoke friction force at all.

Now is there friction force from the reference of truck? No again since the block is not moving at all from the reference of the truck, hence there could be no friction.

So is there friction at all or not in the cases?

Now let the block be made of ice and the surface of the truck is wet, then the acceleration of the block will be different from that of the truck, say it is in the direction of acceleration of the truck but with a lower magnitude than that of the truck. Now from the reference of ground, there must be a force against the acceleration, it is friction. But what type of friction is this? Is this static or kinetic friction?

So in what reference is there a need to introduce friction force? And How does one decide the type of friction from reference other than the surfaces between which the friction exists?