Syntax for tar command

I am trying to extract a file using tar. I cd'ed to the directory I wanted to start in. I had the tar file in the same directory. I executed tar xvf filename . It appeared that it was extracting into the directory the tar file was created from instead of into the directory I was in. How do I get tar to extract where I want? I looked at the man page and I have 2 books for help but I don't see what I did wrong.
thanks, john

If the tarfile was created with directories in the archive, then those directories will be untarred when you do the untar boogie-woogie. Most people do this:

tar tvf filename | more

This allows them to examine the tarfile to see how it is structured before untarring. Then, they untar and move or rename directories as required. You can force tar to untar in another directory, but will still get the archived directories when you untar.

So, even if there is gold at the end of a filetree in the tarfile and you want only the gold, you have to untar the entire filesystem used in the creation to get to the gold!