The period that you are describing is the industrial revolution. The shift that happened is from labor intensive agriculture to capital intensive manufacturing. Which basically means people stopped farming and started working in factories to earn money to buy food instead of produce their own.