How can we cut mirror or glass in a desired shape?
It depends on what sort of shape you're thinking of.

A convex polygon can be done with the scribe and snap method used for rectangles. This uses a wheel glass cutter or diamond scriber You should be all right up to an octagon at least, before the angles between the sides are too small.

Circles and large holes require a special tool 

Small holes can be drilled and notches etc. can be cut using abrasive (diamond/silicon carbide/aluminium oxide) tools, usually wet, and usually slowly. These can be motorised (e.g. a Dremel or a drill) but hand tools are also available.  I've used a precision diamond saw to cut internal corners; this could probably be done using a cutoff wheel on a rotary tool.  Abrasives are also useful for rounding off corners and removing sharp edges (normal wet/dry SiC paper, a tile file, or a knife-sharpening stone)

Grozing pliers combined with scoring are used for tricky shapes, but I'm told there's an art to using them. 



Note: links are to examples so you know what I'm talking about.  I'm not recommending specific products or suppliers. In fact a local hardware shop should have the wheel glass cutter and abrasive drill bits/Dremel accessories.