In the following data, I have used a Galaxy-class starship as a reference. Other starship classes have similar arrangements, but they differ in details.
Physically, the warp core (formally known as Matter/Antimatter Reaction Assembly, M/ARA for short) is a long vertical tube, spanning 12 decks in total. It uses two reactants: deuterium and antideuterium. A huge deuterium tank (total volume 63,200 m3) is located on decks 27-30, and 30 antideuterium tanks, each with a volume of 100 m3, are located on deck 42. On average, a starship requires refueling approx. every three years. Starfleet maintains a dedicated fleet of tanker ships solely for the purpose of refueling ships in deep space.
Both reactant tanks connect with the warp core through reactant injectors. These devices form a steady stream on (anti)matter, and inject it to the core. The reactants come into contact on deck 36 (Main engineering), in the Reaction Chamber. This is where the Dilithium Crystals are mounted. The Dilithum Crystals are exposed to high amounts of EM radiation, which renders it porous to matter and antimatter, allowing antimatter to pass though it without reacting with it. Inside the crystals, the actual annihilation takes place, and the resulting high energy plasma is tunneled to the power transfer conduits for use in the ship's various systems (Note: Pre-TNG treknology fandom agreed that the Dilithium Crystals converted the radiation generated in the matter/antimatter reaction into electricity).
So where do the reactants come from? Space is filled with rogue hydrogen particles. However, the big dish (the deflector dish) is actually used to, as its name implies, deflect the particles. The glowing tips of the warp nacelles (called Bussard ramscoops) are used for collecting them. This is a secondary method, however, and the collected hydrogen particles are used as a reserve. Usually the ship is refueled at a starbase or via a tanker.
As for the generation of antimatter, Starfleet uses solar energy to produce it in dedicated facilities around the Federation (in Mercury, for example). Galaxy-class staships do carry a device used to generate antimatter onboard, but this requires 10 units of deuterium for each unit of antimatter produced, so it is used only when antimatter supplies are exhausted and warp flight is a necessity.