Samsara literally means total (sam) flow (sāra, from the root sŗ: to flow, from the flowing sound of streams). The Buddhist samsara (total flow) is different from the Hindu samsara (transmigration of soul or reincarnation of it). From the law of Dependent Co-origination, there is no independent eternal self/soul/spirit, but only constant interdependent origination/cessation (flow/impermanence: no self-sameness) in the limitless causes and conditions throughout time and space. All dharmas (forms/phenomena) are interdependent and impermanent, there is no self-sovereignty, which creates suffering (''du-kha'': wrong going/going against wishes: undesired/distress) as in sickness, aging, death, loss, parting, etc. (cf. 4/8 sufferings). From no self-sameness (impermanence) and no self-sovereignty (suffering) no self-substance is concluded.
In Buddhism, however, samsara was interpreted by many Hindu converts to Buddhism as Hindu ideas of samsara (transmigration/reincarnation) in India and also accepted in other places as the soul theory was pretty common in ancient times. It is also figuratively used for our transmigrating states through the (five or) six destinies/tendencies/inclinations (gati, lit. going/falling) - hell beings, hungry ghosts, (fighting devils), animal being, human beings, celestial beings - our existential states/conditions. Nirvana is the antidote for samsara, stilling/transcending karma conditions/realms.