How many years does it take for one to acquire a doctorate degree in engineering?
Depends how long you spend to earn a doctorate!
Don't you take some high level courses then do research to make a big discovery and write a long paper on it?
A doctorate usually takes a year or so of courses, a few qualifying exams to prove you know your stuff, and an indeterminate number of years doing research and writing a small book about it called your thesis. The last part is done when it is done... but in total 4-10 years is probably a good estimate. Think 6-7 years on average.
A PhD / DPhil is 3-4(sometime longer) years of solid research.
Is that 3-4 years starting immediately after the master's degree or the bachelor's degree?
3 - 4 years from when you start your PhD some people have masters degrees, some go in straight from a bachelors. In the UK funding is usually only for 3 years, so if you go over that you have to fund yourself. The last year is usually used to write up your thesis.
I should have pointed out that PhD's vary by country, and I'm from the US. (Looking for some actual statistics, I might have overstated the situation a bit as well... it looks like the median time is more like 5-6 years, not 6-7.)
Separate names with a comma.