An ordinary differential equation (ODE) is a mathematical equation involving a single independent variable and one or more derivatives, while a partial differential equation (PDE) involves multiple independent variables and partial derivatives. ODEs describe the evolution of a system over time, while PDEs describe the evolution of a system over space and time.