Due to the current trends in business as the necessity to have a large catalogue of products, orders that increase in frequency but not in size, globalisation and a market that is increasingly competitive, the production sector faces an ever harder economical environment. All this raises the need for production scheduling with maximum efficiency and effectiveness. The first scientific publications on production scheduling appeared more than half a century ago. However, many authors have recognised a gap between the literature and the industrial problems. Most of the research concentrates on optimisation problems that are actually a very simplified version of reality. This allows for the use of sophisticated approaches and guarantees in many cases that optimal solutions are obtained. Yet, the exclusion of real-world restrictions harms the applicability of those methods. What the industry needs are systems for optimised production scheduling that adjust exactly to the conditions in the production plant and that generates good solutions in very little time. This is exactly the objective in this thesis, that is, to treat more realistic scheduling problems and to help closing the gap between the literature and practice. The considered scheduling problem is called the hybrid flowshop problem, which consists in a set of jobs that flow through a number of production stages. At each of the stages, one of the machines that belong to the stage is visited. A series of restriction is considered that include the possibility to skip stages, non-eligible machines, precedence constraints, positive and negative time lags and sequence dependent setup times. In the literature, such a large number of restrictions has not been considered simultaneously before. Briefly, in this thesis a very realistic production scheduling problem is studied. Various optimisation methods are presented for the described scheduling problem. A mixed integer programming model is proposed, in order to obtain optimal solutions for limited cases and in order to analyse the complexity of each of the problem restrictions. In continuation, seven constructive heuristics are presented with the purpose of obtaining fast solutions to the problem in more general cases. Advanced metaheuristic methods are studied in detail, starting with five genetic algorithms that allow studying the effect of the solution representation. Three local search based algorithms are proposed, which is very novel if the elevated complexity of the problem is taken into account. In addition, novel methods are presented that shift the solution representation during the search process in order to acquire near-optimal solutions. The obtained results endorse the use of these new shifting techniques. In the literature, hardly any publications appear that treat multi-objective optimisation for the hybrid flowshop problem. In this Ph.D. thesis, two metaheuristics that produce Pareto fronts for this problem are presented. It is shown that it is not obvious to measure the results, and a methodology in order to do so is proposed, using state-of-the-art techniques. Finally, practical applications are commented in the scope of technology transfer towards companies.