How do DAWs align the phase when working with plugins?
As the author of a few AUs/VSTs an AU hosting app, I'll chime in here:


There is usually no phase alignment of signals passed through effects processing (AU/VST)
The "latency" of the effect is normally reported by the effect to the "hosting" environment on initialization. This way the hosting app can keep all channels in sync (i.e "wait" until all effects have returned the same time-range of audio before mixing, etc). Core Audio SDK states that AUs should implement this property kAudioUnitProperty_Latency if their latency is > 0 seconds.
Sometimes effects do not report their latency to the host app, so there are tools like Voxengo to work around that problem.


If the hosting environment doesn't have an automatic way to handshake &amp; compensate for latency, then its compensation is a manual affair. For example Ableton Live has a feature (17.5 Device Delay Compensation) to help work around these timing issues.