A ronin is a samurai.
Samurai was a status in Japan. A ronin was simply someone of samurai status that had no clan affiliation.
A samurai without a lord was called a Ronin
Ronin are samurai without a master
When a Samurai has no master, they are referred to as Ronin I believe.
The difference between a shogun and a samurai is like the difference between a king and a knight.
Ronin who were master-less Samurai .
they are the positions in which a samurai serves his daimyo
The samurai were responsible only to their master who in turn were part of a chain of alliances ranging up to the emperor. Samurai had no lateral responsibility and if told to attacker kill an equal would do so without hesitation. Ronin (masterless samurai) were pretty much on their own. Challenges were e met, failure to accept challenges was not an option for samurai or ronin.
You may may be thinking of 'Ronin', who were Samurai without a master to serve.
A masterless Samurai is called a 'Ronin' (literally: drifting person).
Samurais in feudal Japan were warriors who served a higher-ranking lord and followed a strict code of conduct known as Bushido. They were skilled in combat, practiced martial arts, and were expected to be loyal, disciplined, and honorable in their actions. Samurais held a high social status and were considered the military elite of Japanese society.
Rurouni Kenshin or Samurai Champloo
Emperor, Shogun, Daimyo, Samurai*, Peasants, Artisan, and Merchants. *There are also Ronin, which are Samurai without a Daimyo (because he/she was killed, committed seppuku, etc.).