Hi Dheeraj, welcome to the forum!
This question that trips up many designers early on.
Website and print use fundamentally different technologies to display images, which affects how you should prepare your files.
In addition, vector artwork (non-rasterized typography and various kinds of graphics) is fundamentally different from raster imagery (such as photographs). Vector artwork is scalable without loss of resolution. Raster artwork can be downsized but not enlarged without loss of quality. Vector artwork is created in vector software, such as Adobe Illustrator.
Raster artwork is created or manipulated in raster software, such as Adobe Photoshop. Adobe InDesign is primarily vector software, but can import raster art, such as photos.
It’s probably worth your time to do a Google search to explain the differences between raster and vector data and the main uses of the software (and similar software) I mentioned — there are always nuances and exceptions.
For Web/Digital:
Resolution: If you’re exporting from Photoshop, use the Export to Web feature and compress the file to the size that looks best. File size matters: optimize/compress your images. Photoshop can dramatically reduce file size while maintaining visual quality. Aim for the smallest file size that still looks good.
File formats:
JPEG for photographs and complex images with many colors
PNG for graphics needing transparency or crisp edges (logos, icons, illustrations)
SVG for simple vector graphics that need to scale perfectly at any size
WebP is increasingly popular for its excellent compression
Dimensions: Export at the actual pixel dimensions needed. For responsive web design, you might need multiple sizes of the same image.
For Print:
Resolution: Minimum 250–300 PPI at the size it will print for materials to be read at arm’s length. However, large-format printing (posters, banners, billboards) can use much lower resolution — typically 20-150 PPI, depending on viewing distance. A billboard meant to be seen from across the street might only need 20-30 PPI, while a wall-sized display viewed from a few feet away might use approximately120 PPI.
For traditional color printing: CMYK (Cyan, Magenta, Yellow, Black) in TIFF or PSD format. For digital printing, it’s usually best to leave the artwork in RGB to take advantage of the additional inks often available on digital printers.
PDF (with fonts embedded and images at proper resolution) is often preferred by printers.
Native files (AI, INDD) with collected fonts and links are sometimes best, depending on the print company’s preferences. For large-format, native files are usually preferred, rather than PDF
Bleed and trim: Add bleed (typically 3mm or 1/8") beyond the trim edge for anything that prints to the edge of the page on brochures, flyers, catalogs, and similar-size products. Include crop marks if required. Larger printed materials often require larger bleeds. Again, it’s best to ask the printer what size bleeds they need.
Font handling: Convert text to outlines/curves if there’s any chance of font substitution issues, though keeping live text (with embedded fonts) is preferable when possible.
I’ve probably forgotten a few things because I wrote this quickly. There are exceptions to almost all these general guidelines, which can be specific to the situation at hand. If you want to know more, please be specific about what you don’t understand, and I or someone else here will explain in more detail. It’s often best to coordinate specifics with the printing company.