How to open various files(image,video,txt) as pop-up on the current browser page instead of opening in separate page? I have seen on several sites, particularly news sites, If we click on video, the video does not open in the separate page, instead small window in the middle of the screen pops-up and video does play there itself and you can close that and behind that your current page is as it is. Same way when we click the image icon on the stackexchange text form to upload the image, small windows open of drag and drop appears.

Hence is there possible in drupal 7, for images, videos, pdf, txt files, word files etc. which opens on the same screen as pop-up in front of current screen.
What you're describing is a modal window. There's a few modules out there for Drupal that create modal windows. The one that probably best fits your use case (media consumption) is Colorbox. Out of the box, it only handles images but there are a number of supporting modules that can handle other media files. See the Colorbox project page link for more information.