How does coffee cause calcium loss in our body?
Caffeine and coffee do not seem to have any significant adverse effect on calcium metabolism. The supposed mechanisms are inhibition of calcium absorption in the intestine and stimulation of calcium excretion in the kidneys.

Effects of caffeine on bone and the calcium economy (Food and Chemical Toxicology, Journal, 2002):


  Caffeine-containing beverage consumption has been reported to be
  associated with reduced bone mass and increased fracture risk in some,
  but not most, observational studies. Human physiological studies and
  controlled balance studies show a clear but only a very small
  depressant effect of caffeine itself on intestinal calcium absorption,
  and no effect on total 24-h urinary calcium excretion. The
  epidemiologic studies showing a negative effect may be explained in
  part by an inverse relationship between consumption of milk and
  caffeine-containing beverages. Low calcium intake is clearly linked
  to skeletal fragility, and it is likely that a high caffeine intake is
  often a marker for a low calcium intake. The negative effect of
  caffeine on calcium absorption is small enough to be fully offset by
  as little as 1-2 tablespoons of milk. All of the observations
  implicating caffeine-containing beverages as a risk factor for
  osteoporosis have been made in populations consuming substantially
  less than optimal calcium intakes. There is no evidence that
  caffeine has any harmful effect on bone status or on the calcium
  economy in individuals who ingest the currently recommended daily
  allowances of calcium.


The Association between Coffee Consumption and Bone Status in Young Adult Males according to Calcium Intake Level (Clinical Nutrition Research, 2016):


  This study analyzed and compared the BMD [bone mineral density] and
  bone metabolism markers according to coffee intake in Korean young
  adult men aged 19-26 years. No significant associations were found
  between current coffee consumption level in Korean young men, and bone
  status and metabolism according to the calcium intake levels.