This question already has an answer here:
I'm on Mac OS X 10.7.5. In Finder windows, besides the sidebar, there is a sort of "upbar", right below the name of the folder you are viewing but before the colum/list/icon view of it, where you can put shortcuts to files. This is a screenshot of a typical window on my computer:
Edit - it's called the Toolbar, I've edited the Question title to make it easier for others to Google.
As you can see, next to some buttons which include view controls there are 6 item buttons: a txt, a tex, a tex, a jpeg, a doc(x) and a tex. They all got there by accident and I can't find a way to get them away. How do I remove them?