Appears to be a few ways, some which may be more correct than my method. But I usually create a new image like so:
image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Then if you wanted to use the Java2d Graphics & Graphics2D classes to draw onto it, you can just grab the image's graphics object like this:
g = image.getGraphics();
To manipulate it 'pixel by pixel' you have a couple of options. One of the simplest is using BufferedImage.getRGB(int x, int y) and BufferedImage.setRGB(int x, int y, int RGB).
Alternatively you can grab the image's 'data buffer' directly as an array. This can be a better approach performance wise, as you don't have the overhead of the get/setRGB() methods. One way to do this is:
imgArray = ((DataBufferInt)image.getRaster().getDataBuffer()).getData()
Rightly or wrongly, that's generally how I do it...