Having an photo of 4000x3000 resolution with 240ppi. Is it possible get a resolution of 400x300 resolution but with higher ppi?
If possible how to do that?
Pixels per inch don't actually exist until the image is rendered onto some physical medium such as paper or the monitor on your computer. The device doing the rendering determines PPI and PPI determines how large the image will appear when rendered.
Rendering your 4000x3000 on a device capable of producing 240 PPI would produce a 16.6"x12.5" physical image. The same image on a 300 PPI device would come out at 13.3"x10".
Where you have to think about PPI is in planning for printing.
I send a lot of 8x10s to my lab, which prints them on a 300 PPI device. If I want control over every pixel they print, I need to figure out exactly what size image to send them. Multiplying inches by PPI gets me 8x300 = 2400 for the minor dimension and 10x300 = 3000 for the major dimension, making those images 2400x3000. When you tell your image editor you want some size at some PPI, it does the math for you.
PPI (pixels per inch) value of a digital image is only metadata used to determine how large an image should be printed.
You can set the value to be whatever you like, without having to resize or do anything with the actual pixels.
For example if you took your 4000 x 3000 image at 240PPI and placed it into Adobe InDesign it would end up 16.6 x 12.5 inches on the page. If you took the same image and set the PPI value to 480 and placed it it would end up 8.3 x 6.3 inches.
If you resized your image to 400 x 300 pixels and set the PPI to 480 and placed it it would end up 0.8 x 0.6 inches (very small indeed).