Linear programming is a technique to allocate limited resources to optimize an objective like profit maximization. It involves identifying decision variables, constraints, and the objective function. An example problem maximizes profit from manufacturing dolls and guns given constraints on machine hours and profit per item. The objective is to maximize profit which is formulated as a linear function of doll and gun units, subject to constraints on machine hours from each item.