Three types of motor may be used, both of which could do this. One of these (the Synchronous motor) is wat is used here and is a subset of the Brushless DC motor. (A misnomer as there is no pure DC used in the motor proper in a BLDCM).
The actual motor type is a synchronous motor, identified correctly by jpa.
The synchronous motor is a special-case of the BLDCM (Brushless DC motor) that I describe below. In the general case a BLDCM generates an AC field from a DC source - either a fixed frTequency field that the rotor follows at fixed speed, OR from a variable frequency a source whose frequency is based on the current rotor speed and applied in such a way that the rotor "chases" the field which is derived from its own motion. (Phase lead/lad allows speed change - another subject). In the synchronous motor seen here there is a coil with winding axis vertical when motor sits flat on a surface. The coil connects to (in this case low voltage AC via a transfomer from) the AC mains so alternatively produces N-S or S-N magnetisation along its axis. Poles are created by adding plates with multiple radial tabs - each tab is a pole. As the coil changes NS, SN, NS the alternative tabs are all N or all S and as the field changes the NSNSNS... patterm moves in steps around the circumference. The rotor has N and S permanent magnet poles. These initially aligh in opposite phase wrt the stator poles and when these reverse polarity the rotor is attracted AND repulse to a position one tab away. However, if fully symmetrical, a N pole on the rotor could be attracted to the S to its "left" or the S to it's right. Ince rotating it will have a preference for the pole in its direction of motion but, as startup, could go either way. And does.
Stator pole polaritiesreverses succesively
NSNSNS ...
SNSNSN ...
NSNSNS ...
Rotor follows stator changes
(1) From here
NS <- rotor in position 3-4
SNSNSNSN <- Stator
(2a) To here is valid
NS <- rotor moves left to position 2-3
NSNSNSN <- Stator changes polarity from (1)
(2b) But, so is:
NS -> rotor moves right to position 4-5
NSNSNSNSN <- Stator changes polarity from (1)
In this case there is no DC - the field is suppluied from AC mains and the rotor "chases" the rotating AC field.
Motor types:
(1) Most usual in the past - Traditionally a "shaded pole" motor may be used where a "bodge" is used to distort the magnetic field from a field winding in such a way that a rotating magnetic "vector" is produced that the rotor follows. A magnetic shunt is produced with a turn of conductor at the airgap in the steel core that the field coil is wound on. When power is first applied the rotor position relative to the airgap will cause it to be jerked in one or other direction and once motion has started the rotating field that results reinforces that motion.
Shaded pole motors are simple, cheap, and have been around for almost ever.
Excellent laymans introduction to shaded pole motors - You tube video. 8 minutes.
Shaded Pole Motors - Wikipedia

(2) A brushless DC motor (BLDCM) may be used.
The synchronous motor described above is a special case simple subset of a BLDCM. In both cases a permanent magnet rotor follows a rotating AC field. In a 'true' BLDCM the fe\ield is usually generated electronically by switching DC. In these simple synchronous motors the rotating field is supplied from the AC mains via a transformer.
Motors that need a clean fast start use magnetic sensors that give absolute feedback on direction and speed. Motors that must rotate the right way (eg disc drive motor) may use sensorless systems that derive back EMF voltages from the motor windings BUT circuitry is included to check rotation and adjust the powering if direction starts wrongly. Systems that do not care about direction and that want lowest cost just use a sensorless system and accepts what comes.