How can I show only webform content by excluding header,footer? I wan to show only the form elements in an modal(popup), but am not able to achieve that. Along with the form elements header, footer is also showing. So how can I remove those things for specific webform?

I tried by creating a template file with the name webform-form-162101.tpl.php. But it doesn't helped me. Please share some other way to achieve this.
If your lightbox/modal behavior can target just a section of HTML markup on the page. Some modal plugins only open full webpages, others allow targeting sections of your DOM.  It sounds like you're currently using the latter.  Here's an example of a lightweight modal plugin that allows targeting html embedded on the page as opposed to an entire webpage (but if you're comfortable with javascript, you could implement this yourself too):  https://robinparisi.github.io/tingle/

If you need the webform available on multiple pages, you could set the webform to be available as a block and then target that block to load in the modal.

To enable showing the webfom as a block, go to the Form Settings subtab/page of the webform, scroll down and expand the ADVANCED section and check the checkbox (shown below).