Mg(CH3COO)2·4H2O contains four water molecules—but they aren't simply trapped moisture.
In magnesium acetate tetrahydrate, water is part of the organized hydrated crystal. It therefore affects the structure, thermal behavior, molecular weight, and amount of magnesium present in a weighed sample.
Heat the material and those waters leave. The original crystal structure is disrupted, and dehydrated magnesium acetate can even exhibit glass-forming behavior.
Dissolve it instead, and the salt becomes a convenient source of Mg2+ for solution chemistry, biochemical work, and materials synthesis.
A hydrate formula's dot may look like punctuation. Chemically, it can describe an essential part of the material.