Depends on the coral!
Symbiotic algae, captured particles such as plankton, and take up dissolved substances from the water.
The animals themselves are heterotrophic and consume plankton and dissolved molecules. Next to this, many species receive photosynthates from symbiotic algae, which are commonly called zooxanthellae. These photosynthates are produced by means of photosynthesis, and comprise sugars, fatty acids, glycerol and amino acids. Although corals themselves are heterotrophic just like all other animals, both hetero- and autotrophic processes take place inside their tissues (excluding corals which lack zooxanthellae). Corals are often considered as being either autotrophic or heterotrophic. They are probably best viewed as polytrophic, using both ingested and translocated carbon as energy sources.
Phytoplankton
Phytoplankton are free floating microscopic plants that grow in the upper regions of the ocean where sunlight is plentiful. These small plants, which are composed of algae, are the bottom of the food chain for the entire ocean, and the largest group of primary producers in the ocean. There are several hundred species of phytoplankton. In a typical reef aquarium, the phytoplankton population is very low to non-existent - either it gets consumed faster than it can reproduce, or gets removed by skimmers. Phytoplankton serves as the primary food source for a lot of reef organisms.
Algal Photosynthesis
Most reef-building corals have a mutually beneficial relationship with a microscopic unicellular algae called zooxanthellae that lives within the cells of the coral's gastrodermis. As much as 90 percent of the organic material the algae manufacture photosynthetically is transferred to the host coral tissue. Due to the need for sunlight to conduct photosynthesis, this type of energy production happens during daylight hours
All this and some stony corals with tentacles will consume any larger foods like brine shrimp and copepods.