How car braking system work?

I have a question about how does car/van stop while applying brake.
I have ford freestar which have 4 disc brake system.
It run only with two front wheel which are connected to transmission or engine.
So my question is when I apply the brake pedal, the brake are apply only on front 2 wheels or also on rear wheel?

No

The brakes are applied to all four wheels. Which wheels are driven doesn't matter; it's been the same for the last hundred years or so.

If it's disc brakes, there's a disk right behind each wheel and a caliper for that disc that has lines running up to maybe a proportional valve and then the master cylinder.

The basics are: when you apply pressure to the brake pedal, fluid will cause the brake parts to expand and press against the disc pads or the drum shoes; that will stop the vehicle… If you want detailed info, message me

All four wheels brake the front start first, as you apply the brakes harder, the rear start braking.

Which wheels are driven makes no difference.
Brakes are applied to all 4 wheels.
The front wheels do most of the braking and thus tend to be larger than the rears
When you press the pedal the pads press on each disc causing friction. The friction causes the energy in your moving car to be changed into heat energy. The brakes are designed to quickly displace that heat to the air around them.

How about learning how to use your search box and ask "how does 4 wheel disc brakes work"? That way you'll likely find pictures or a video showing you how they work!

The brakes these days are hydraulic brakes which operate the disc brakes on each wheel when you push down on the brake pedal. These days the brake pedal is connected to a pressure booster unit that amplifies the pressure that your foot can supply and presses on a hydraulic cylinder that forces oil through thin pipes and hoses into the hydraulic slave cylinders on each wheel which pushes the disc brake pads against the brake disc causing the car to brake.

Brakes apply to all 4 wheels, rears grab first then fronts( by a split second).