Also, please let me know if I can do DOM manipulation of visual force pages which are from a managed package.
I take your question to mean "can you modify a page from a managed package authored by someone else and installed in an org". While you can see the page source, unless the author of the managed package included a mechanism to wire in an alternate page you can't add to the page or change it. (A special case is if the page is not referenced within the package and uses a global controller and global components you could re-create it and change it.)
But a managed package publisher is very unlikely to guarantee to never change the DOM structure or CSS styling or specific id values and your DOM manipulation could break the managed package and will certainly discourage the managed package author from supporting you. So it is only an approach to consider in specific and limited circumstances and bearing in mind the risks.