Hello! Correct me if I'm wrong, but as far as I know, in Dungeons & Dragons 3.5e, warlocks works with magic the same way as other arcane casters - through touching the Weave. However, it is impossible not to notice the "dark" orientation of the warlock's invocations - all his magic refers to the Nine Hells or has a "dark" theme . So, from lore's point of view, what is the source of the warlock's magic in the 3e? And how can a warlock with a good alignment have access to the dark magic of this class? Bring down all the power of lore and fluff on me, please, I need it right now!
The Weave is specific to the Forgotten Realms campaign setting. Other settings have different magical mechanics that allow for spells to be cast. This may or may not even be relevant for warlocks, as their powers are spell-like abilities (SLAs) rather than spells. While they function much like spells, they are typically described as coming from an internal source, using the magical creature's own energies, rather than drawing on external magic such as ambient magical energy from the astral plane, the Weave, or whatever else the setting calls for. In the case of warlocks, they specifically get their powers from a powerful patron, typically a fiend or fey of some sort, although the fluff is not exclusive about that and I believe even mentions some that just have magic power inherently from some magical bloodline.
Warlocks must be evil or chaotic. Chaotic-aligned warlocks (which can be good-aligned) typically get their powers from a pact with a fey patron, rather than a demon, devil, or other evil outsider.