A needle bearing has the two smooth surfaces separated by round shafts. The system only provides one degree of freedom. That is, the surfaces can only move backwards and forwards in one direction.
In a modern bearing the shafts are held in place with cartridges which do not interfere with the movement of the shafts but the system has been in use since people started making tools. Shifting heavy objects by rolling them along on logs has been used for millennia.
The system is not restricted to two planar surfaces but can be extended to any two surfaces which are parallel to each other within an axis of freedom. For example, concentric rings.
The advantage that the bearing offers is that the area that compression force on the bearing is dissipated over a much larger area than that for a ball bearing, much like the flat track on a tank going places a 4WD cannot. This allows designers to make their bearing surfaces thinner and lighter, or more rigid by adding more material for an equivalent volume. As point load on the individual bearings is a lot less, the risk of bearing collapse is diminished.
Cannondale mountain bikes use needle bearings to manufacture their Headshok front fork. The steerer tube that links the handle bars to the front forks telescopes in and out of the headtube. The square shaft of the steerer tube is supported on all four sides by needle bearings. In and out movement has minimal friction but lateral forces on (or forces perpendicular to) the axis of movement do not restrict the motion of the fork in any way due to the large amount of support provided the mechanism.