A diffuse-interface model for microstructures with an arbitrary number of components and phases was developed from basic thermodynamic and kinetic principles and applied to the study of ternary eutectic phase transformations. Gradients in composition and phase were included in the free energy functional, and a generalized diffusion potential equal to the chemical potential at equilibrium was defined as the driving force for diffusion. Problematic pair-wise treatment of phases at interfaces and triple junctions was avoided, and a cutoff barrier was introduced to constrain phase fractions to physically meaningful values. Parameters in the model were connected to experimentally measurable quantities. Numerical methods for solving the phase-field equations were investigated. Explicit finite difference suffered from stability problems while a semi-implicit spectral method was orders of magnitude more stable but potentially inaccurate. The source of error was found to be the rich temporal dynamics of spinodal decomposition combined with large timesteps and a first-order time integrator. The error was addressed with a second-order semi-implicit Runge-Kutta time integrator and adaptive timestepping, resulting in two orders of magnitude improvement in efficiency. A diffusion-limited growth instability in multiphase thin-film systems was discovered, highlighting how ternary systems differ from binary systems, and intricate asymmetries in the processes of solidification and melting were simulated. A nucleation barrier for solidification was observed and prompted development of a Monte-Carlo-like procedure to trigger nucleation. However when solid was heated from below the melting point, premelting was observed first at phase triple junctions and then at phase boundaries with stable liquid films forming under certain conditions. Premelting was attributed to the shape and position of the metastable liquid curve, which was found to affect microstructure by creating low energy pathways through composition space. Slow diffusivity in solid relative to liquid was shown to produce solutal melting of solid below the melting point. Finally, the multiphase method was used to produce the first reported simulation of the entire transient liquid phase bonding process. The model shows promise for optimizing the bonding process and for simulating non-planar solidification interfaces.