Structure of Dolomite
I don't really like the picture but let's try to do this with that. 
So, you probably know about the NaCl lattice? In there sodium is surrounded by six chlorides, which forms an octahedron. Chloride has six sodium around it to form another octahedron. And you have probably heard that also other compounds crystallize in this lattice, let's say sodium bromide (so increasing the anion in size) or potassium chloride. It does not change the crystal structure.

Now, what about more complicated units. Let's deform that spherical anion to an elongated one. What about calcium carbide? The C-C unit with its triple bond is unlikely cleaved during the crystallization, so we can count the $C_2^2-$ unit as one part. This forms an elongated cell but still, it is a NaCl-type lattice. 

If we make it flat instead we end up with something like carbonate for example. As you may no the carbonate unit is flat, it's basically a triangle with the carbon in the center. If we see this unit as one part then we can just form another NaCl-lattice. And as the jump from sodium chloride to potassium chloride was possible, we can assume that if calcium carbonate crystallizes in a deformed NaCl-lattice, then magnesium carbonate will do the same. 

And the final step is to combine them now, instead of separating the two phases, 1/2 of the calcium-ions are just exchanged by magnesium to form the dolomite-structure. 

So you could say that carbonate forms a cubic packing where 50% of the octahedral sites are occupied by calcium and the 50% by magnesium for example. All carbonate-units are parallel to each other therefore creating one direction in which they do not require that much space causing the deformation of the cell. 

The metals are coordinated by (and I had to load this in my solid state software as well to see it) six oxygen on the carbonates, or if you take the center carbon of each carbonate unit also by six carbonates, which forms an octahedron again. On the other hand, each of these center carbons is coordinated by three oxygen in a triangle or if you count the counter ions by six metals in the shape of an octahedron. 

In your structure you can start off by looking at the dark atoms, which are the carbons, and connect them to the red ones, so can see it will always form triangles. For all the others it's hard to see in this picture. If you want I can also highlight you the different polyhedra in my software so you can see it better. Because this is just a unit cell so it is cut at some positions creating the feeling that some of the connections are wrong. You'd have to watch several unit cells aligned to see the full structure of it. But if you imagined the yellow and the blue ones to be the same you'd end up with the Calcium carbonate or magnesium carbonate structure. 

EDIT: I also added the crystal structure now: 

EDIT II: Because there were still some problems I tried to further explain the structure a bit. I don't know how others see this structure but I like this layer explanation and it's also the one you can find in many books. So please just look through the new attachment and tell me if this helps you more.