TLDR: It uses this formula to calculate the size of the boxes, as far as I can tell: $$\frac{LargestDimensionOfYourObject} {2^\text{OctreeDepth} \times Scale}$$
When you hover over the Scale box in the modifier, the tooltip tells you that it takes into account the "largest dimension of the model":

So I prepared a scene with objects with various dimensions, 4 copies of each. They all have the Remesh modifier, with their Octree Depth increasing by 1 with each copy. Then I took the measurements of all the original objects at their maximum, plus the measurements of their voxel cubes at different octree depths:

When you divide the longest size with the first voxel cube size you consistently get 1.8
, after which it gets halved with every iteration. That 1.8
obviously comes from $Scale(0.9) \times 2$, but it's too easy a relation so I took more measurements using a 5m cube at different depths to make sure:

When we divide object length with the resultant boxes, we get nice round numbers. Let's call this Divider. This table then tells me that for every 0,1
increase in Scale, the Divider value increases in relation with the Octree Depth in a rhythm of 2, 4, 8, 16...
which is obviously $2^n$. The formula seems to be:
$$\frac{BoundingBoxMax} {2^\text{OctreeDepth} \times Scale}$$
So, say, if you have an object that's 7
m at its longest side and a Remesh modifier with the values Octree Depth: 3
and Scale: 0.7
you'll get a mesh built out of boxes with an edge length of $7 \div (2^3 \times 0.7) = 1.25m$.
Note: If you look at the screenshot, you'll notice that the only object violating the formula is the torus. I suspect that's because it gets divided into 4 instead of 2 with the first Octree Depth which is probably due to the hole. So I guess the algorithm calculates the voxel size according to the formula, puts one cube in the middle of the mesh volume, then fills out the rest with more cubes stack on top of the original. Or something like that. Then it simply smooths them if you have Smooth or Sharp modes selected instead of Blocks, since the manual says that that's the only difference between them.