Machine = any mechanical or electrical device that transmits or modifies energy to perform tasks such as a sewing machine, washing machine or computer: ‘Do you know how to operate a machine?’ ‘The latest machines can run both types of software.’
Engine = a machine that converts thermal energy to mechanical work: ‘It was difficult to make yourself heard above the roar of the engines.’ ‘Check the tire pressures and top up the engine oil.’