Example: If I know I am going to need 6 inch x 6 inch on print, I will only need 4 megapixels at most. Should I take pictures at 4 megapixels or more?
I want to know how the camera works. Does the camera resize the image after it have taken it or does it use only some of the pixels on the sensor?
First you will have to crop some of those 4 MP away to make a 1:1 aspect ratio print (6x6). You don't say what camera is involved, but most DSLRs give 3:2 aspect ratio photos, while a few give a 4:3 aspect ratio image.
Second, a 6x6 print is a gift or desk size print, and will be looked at from a small distance, usually less than arm length. So, it will need to be printed using a fair number of pixels per inch (PPI).
If the 6x6 print is made using 300 PPI, the math indicates we need -
300 PPI x 6 inches = 1800 pixels on each side of the print. Again thinking of the native aspect ratio of the camera, we may need as many as 2700 pixels by 1800 pixels in the original image if the camera has a native 3:2 aspect ratio.
If you are willing to forgo some image quality by printed a 6x6 at a smaller PPI, the math indicates -
200 PPI x 6 inches = 1200 pixels and
100 PPI x 6 inches = 600 pixels.
As far as how the camera works when making reduced resolution photos: Which Camera?
But, the size of the pixels on the image sensor cannot be changed.
The Nikon D7000 shows the following pixel dimensions for the 3 image sizes it has available.
DX-format
(L) 4928 x 3264
(M) 3696 x 2448
(S) 2464 x 1632