As I understand it, dilithium crystals control the matter/antimatter reaction somehow. Zephram Cochrane's first flight used a ship powered by a nuclear reactor, I think.
The warp field is made with an array of "warp coils" which apparently require the large amount of energy from the matter/antimatter reaction to create a subspace distortion field that allows warp travel. What is subspace? It's never adequately explained, but sometimes monsters come out of it and kidnap you to a pocket dimension where they rearrange your organs.
Antimatter is only used because, when combined with matter, it has a higher energy density than anything else known, including fusion. That part is completely within known physics. The "dilithium" is used somehow to control the matter-antimatter reaction; they have nothing to do with the warp field. Why the writers came up with this I don't know, but it does make for a convenient plot device sometimes when they have some problem with dilithium mines on some distant planet. Like various hard-to-acquire materials today, there are political problems caused by the scarcity of dilithium, and this comes up in many episodes. And, conveniently, dilithium somehow can't be replicated by the regular matter replicators.
The warp field is created by the warp nacelles. How? Who knows.
Dilithium is a mediator for a deuterium/antimatter reaction that generates the fantastic amounts of power required. The warp field is generated by some sort of coils in the nacelles.