The other day my teacher said ketone bodies are mostly formed when insulin is less and NIDDM type diabetes mellitus has less chances to grow ketosis. https://medlineplus.gov/ency/article/000320.htm P. S. I had read the difference between the type 1 and type 2 diabetes.
This is a good and important question. The answer is not obvious, or necessarily well understood. Hyperglycemic crises occur in both Type 1 and Type 2 diabetes. In type 1 diabetes, the crisis is more likely to be diabetic ketoacidosis (DKA). In type 2 diabetes, it's more likely to be something called hyperosmolar hyperglycemic state (HHS), though type 2 diabetics can develop DKA, especially later in the course of the disease. Both can be brought on by similar precipitating events (for example, infection) in an individual who has had diabetes for a very long time (and this is where we often see these patients now -- pneumonia or the flu in an older diabetic). With type 1 diabetes, though, it can be how diabetes is discovered in a young, otherwise healthy individual.
The key difference between type 1 and type 2 diabetes is that type 1 is an absolute loss of insulin production, typically due to autoimmune destruction of the cells of the pancreas that produce insulin. Type 2, on the other hand, starts as insulin resistance. In fact, insulin levels may be high early in the course, but the tissues do not respond appropriately.
Insulin actions in glucose and fatty acid metabolism
Broadly, a key role of insulin is to respond to increases in blood glucose by shifting energy metabolism from fatty acids to glucose.
In a healthy individual, insulin is secreted as blood glucose rises, and causes peripheral tissues, especially fat and muscle, to take up and use glucose. It also causes the liver to release less glucose into the bloodstream from glycogen stores and gluconeogensis, and instead to store it (in glycogen).
At the same time, since there is plenty of glucose available, insulin diverts fatty acids to fat cells, promoting their storage in and inhibiting their release. Insulin indirectly prevents fatty acid catabolism in the liver by promoting its storage in fat cells, but also directly inhibits liver ketogenesis, a process by which byproducts of fatty acid and protein catabolism are converted to ketone bodies that can be used by, among other tissues, the brain.
Impaired insulin signaling
In both DKA and HHS, despite high levels of blood glucose, the muscles, fat cells, and liver act as if the organism is starving. In response to this state, counter-regulatory hormones (catecholamines, cortisol, glucagon, and growth hormone) are released. The liver releases glucose from glycogen stores and generates even more glucose from other metabolites through gluconeogenesis.
The difference between DKA and HHS is how lipid metabolism is regulated. It is unclear why, exactly, in HHS insulin fails to regulate glucose metabolism but seems to succeed in suppressing lipolysis and ketosis, but that is the current hypothesis. In DKA, fatty acids are released from adipose tissue and delivered to the liver, where massive unregulated lipid catabolism and ketogenesis occurs. In HHS, the existing insulin seems to be effective at suppressing lipolysis and ketogenesis.
You can read more about the pathophysiology of both these diabetic hyperglycemic crises in this excellent review.