How is it decided what type of food we want to eat? For example, sometimes you would like to eat some sweets but not a full meal, other times you'd like to eat some fruit, sometimes not and so on.
I have read somewhere that organism can detect whether we are hungry or not and it gives the effect so that we feel that we are actually hungry. But the question is: is there something that measures for example what is level of glucose or aminoacids or some fats in blood and specifies not only whether we are hungry or not but also what type of food we should eat to replenish lacking resources?
I'm no biologist but here are two answers to your multidimensional question. "How is it decided what type of food we want to eat?"
There is new research into neuroscience and microbiological science about a phenomena where bacteria in our gut that produce vitamins and digest things that we cannot digest, contribute to the choices we make for our diet. Don't ask me how, but from my understanding they must somehow communicate with the brain to release dopamine while stimulating neurons responsible for choosing a certain food to crave.
"Is there something that measures for example what is level of glucose or amino-acids or some fats in blood...?" Well yes actually, let's take the pancreas for example. It knows when blood sugar is high from digested materials and will begin to produce insulin. I won't go much further because already there is a response based on the detection of sugars. Your entire digestive tract is based on these detective processes in order to appropriately digest and react to digested material. Are there processes that tell your brain what to eat next? Well besides the bacteria, there are plenty of hormones produced by your gastrointestinal tract such as Ghrelin which is the most common "hunger hormone" and is responsible for homeostasis aka energy regulation/distribution throughout your body.
It's better not to ask how but to ask why when researching topics similar to this, the how is almost always provided. I'm not entirely sure how those hormones communicate with the brain, my knowledge of the brain is less biochemical and more neurological (e.g. neuron formation).