My rear disk brake doesn't lock in place. Don't know whether hydraulic or mechanical My rear brake does not work (disc brake) MTB for anything.  It does not skid or even stop for that (brand new) What should I do?

I went to my local bike shop in India and he told me that disc brakes (rear) don't work well because the wire goes all the way to the back of the bike and gets twisted in the process.

I am 13 so I don't know much about disc brakes.  How can I make it lock easily?  How do I check whether mechanical/hydraulic?
You mention the brake is brand new.

Have you "bedded" the pads in?
Bedding involves riding down a hill and feathering the brake lightly.

The other possibility is pad / disc contamination. In particular oil.
Discs can be cleaned with appropriate solvent.
Pads can be cleaned by baking (faced down) on grease proof paper or gently heating over a flame to burn off the residue.