Corals host a highly diverse microbiome that provides key services, such as protection against pathogens and nutrient cycling, forming the coral holobiont. The coral surface mucus layer (SML) microbiome is very sensitive to external changes and constitutes the direct interface between the coral host and the environment. Environmental factors and microbe-microbe interactions act simultaneously on the microbial community structure, making the microbiome dynamics challenging to predict. The coral microbiome is essential to the health of coral reefs. Coral bleaching and disease outbreaks have caused an unprecedented loss in coral cover worldwide correlated to a warming ocean. Fortunately, acclimatization to local temperature increases coral thermal tolerance. My PhD investigates the role of the microbial community as a source of acquired heat-tolerance and an acclimatization mechanism for the coral holobiont. In chapter 1, I describe whether the bacterial taxonomic and functional profiles in the coral SML are shaped by the local reef zone and explore their role in coral health and ecosystem functioning. In chapter II, I develop a dynamic model to determine the microbial community structure associated with the SML of corals using temperature as an extrinsic factor and microbial network as an intrinsic factor. In chapter 3, I experimentally test whether physiological heat tolerance is higher among corals that are locally acclimatized to temperature fluctuations and whether heat stress has a deterministic or a stochastic effect on the coral SML microbiomes. The coral SML microbiome from Pseudodiploria strigosa was collected from two naturally distinct reef environments in Bermuda: inner reefs exposed to a fluctuating thermal regime and the more stable outer reefs. A laboratory experiment was conducted to compare the coral holobiont physiology and microbiome under heat stress. Shotgun metagenomics was used to describe the taxonomic and functional profiles and the microbial network of the coral SML microbiome. The coral SML microbiome from the thermally fluctuating inner reefs provides more gene functions that are involved in nutrient cycling, stress response, and disease protection. In contrast, the coral SML microbiome from outer reefs showed high proportions of microbial gene functions that play a potential role in coral disease. The SML microbiome was best predicted by model scenarios with the temperature profile that was closest to the local thermal environment, regardless of microbial network profile, concluding that the coral microbiome is primarily structured by seasonal fluctuations in temperature at reef-scale, while microbe-microbe interaction is a secondary driver. Corals from a more fluctuating environment maintained high photosynthesis to respiration ratios, showing tolerance to heat stress. The metagenomes of corals exposed to heat stress showed high similarity, indicating a deterministic and stable response of the coral microbiome to disturbance. In conclusion, my dissertation shows that reef-scale acclimatization to a more fluctuating temperature profile results in a more beneficial coral microbiome and physiologically resistant coral holobiont. Therefore, my study supports conservation efforts that focus on promoting and maintaining coral microbiome health to protect coral reefs.