The core is a single integer index, often guarded so concurrent requests do not pick the same slot. A common implementation is next = (current + 1) % serverCount. With three servers indexed 0, 1, 2, the sequence of picks is 0, 1, 2, 0, 1, 2 and so on. NGINX, HAProxy, and the Linux IPVS kernel scheduler all ship round robin as a built in policy.
Weighted round robin extends the basic idea for servers of different sizes. You assign each backend a weight, say a beefy 16 core box gets weight 4 and a small 4 core box gets weight 1. The algorithm then hands the bigger box four turns for every one turn the small box gets, so traffic roughly matches capacity. NGINX writes this as server backend1 weight=4.
At the DNS layer there is also DNS round robin, where a single hostname resolves to multiple IP addresses and the DNS server rotates the order it returns them. Clients usually connect to the first address, so rotating the list spreads connections across machines. This is cruder because DNS caching by resolvers and browsers can pin a client to one IP for minutes or hours.