Choose File > Export and select PDF as your format, choose a location and click Save.
An error message, "PDF export failed" is displayed when downsampling is enabled for an InDesign document.
When you place images, or graphics, and scale them down significantly, it results in increase in resolution. Example: If you place a 600 dpi image without scaling, it consumes a large amount of available memory on your system. So, the usual practice is to scale down a 600 dpi image to 50% for effective resolution and export. Such PDFs fail during export because of the downsampling of the images.
For PDF export failures other than downsampling, see here.