Voltage Regulator vs Voltage divider?

Recently in Basic Electronics course we studied about the Voltage dividers, whereas many people say in 90% of the cases we can't use a voltage divider for electronics, servos and other components circling around Arduino, So what exactly are the cases in which we use voltage regulator and what are the cases when we can't use a voltage divider?

A voltage divider is used in many circuits to determine a particular voltage level, but only if the current draw from the divider junction can be neglected.

If the output current is constant and cannot be neglected, the basic voltage divider equation is not applicable. The output current must be included in the calculation.

A voltage divider is passive and does not "regulate" voltage.

A voltage divider is founded upon ohm's law, and assumes that the current going through the resistors is equal. When this is true (ie, negligible current drawn from the middle of the divider), it works just fine. So it's great for reference voltages and stuff. But if you need to power anything with it, you need to use a voltage regulator, which has active circuitry in it that will keep the output voltage constant as the output current changes.

Typical use for a voltage divider is attenuating a signal to a particular level as with a
volume control, or to enable measurement of a larger voltage than an ADC can handle.

For instance a mutimeter's internal circuitry is mainly a bunch of precision voltage dividers.

Electrical:
Recently in Basic Electronics course we studied about the Voltage dividers, whereas many people say in 90% of the cases we can't use a voltage divider for electronics, servos and other components circling around Arduino, So what exactly are the cases in which we use voltage regulator and what are the cases when we can't use a voltage divider?

Let me teach you one useful thing first. It is called 'google'. In the google search engine box, type 'voltage divider and voltage regular differences'. There you will get your answer.

But I'll tell you another thing here. A basic voltage divider ---- supposing it is a purely resistive voltage divider, is formed using two resistors. The mid-point (ie. the point between the two resistors of the divider) will have a voltage (relative to a reference point) that depends on the current that flows through this divider (and also on the values of the two resistors). The two resistors are connected in SERIES. So........ QUESTION --- if you then connect some other circuit to the mid-point that draws a significant amount of current...... then will the original mid-point voltage still be maintained? Answer is ..... 'no'. This means that the voltage divider will only hold (maintain) its original mid-point voltage if whatever external circuit (to be connected to the mid-point) does not draw a significant amount of current (relative to whatever series current was flowing through the resistors originally). So, this means...... if you want to reduce a parent (source) voltage using a voltage divider, and if you want that mid-point voltage to be more or less constant..... THEN....whatever you connect to the mid-point NEEDS to have a resistance (or impedance) that is relatively high .... such as 100 TIMES (or more) the following value: (R1*R2)/(R1+R2), where R1 and R2 are your voltage divider resistor values. It is a parallel resistance expression, which arises from a Thevenin equivalent circuit analysis of the voltage divider. If this condition isn't met, then the overall circuit (with your external circuit connected up) won't behave like the original "voltage divider". Or at least, it wouldn't do what you wanted it to do for you.

If the external circuit has a relatively high input impedance...such as an input to an op-amp, and if whatever you want to do with the voltage divider doesn't create any issues, and if it just gets the job done easily/conveniently/reliably/efficiently......... then just use it. For example, if a particular input pin requires a CONSTANT voltage of 4 volt DC to be applied to it so that the rest of the circuit says 'ok..... required condition met.....carry on with operation', but you only have a constant 5 volt source. If you know in advance that the input pin (for which the 4 volt needs to be applied) and if you know in advance that the input is relatively high impedance (eg 1 Mega-ohm), then you could make yourself a voltage divider with suitably chosen resistor values to achieve the required 4 volt.

Next consider the voltage regulator. A voltage regulator's purpose is to maintain the same voltage (if it can), regardless of what is connected to its output terminals.

Also...... if you're doing a basic electronics course, and they teach you those things, then it does make sense if you ask the person who taught you these things. This means .... if you don't know where either a divider or a voltage regulator is applied (in general), then it makes sense to ask that teacher.....unless you never see that teacher again after your course.