For example if I am painting a plane I only want its certain specified part to be painted. I tried using a box to cover the area which is not to be painted and when i start painting, the whole area gets painted. So I want to how paint only a certain specified area.
Masking using 'Face selection masking for painting' option.
Masking using painted stencil.
Paint the areas where you want your texture to appear with a black color (create a mask). Save an image. Your mask is ready.
In Slots bookmark of a Tool Shelf check the Mask checkbox, choose the UV map you want to use (the one with the painted stencil displayed). Then select your painted mask image (click on an image icon under the Stencil Image). If you want to inverse the mask click on the b&w square under the Visualisation.