Goal programming is a mathematical method used to solve linear programs with multiple objectives, treating each objective as a goal. It utilizes deviation variables to measure goals' overachievement or underachievement, and prioritizes them in a sequential manner to minimize goal deviations. The approach includes formulating linear programs based on prioritized goals and ensuring higher priority goals are maintained while working towards lower priority objectives.