To extract a tar.bz2 file, use the command (note the j option)

Code:
tar -jxvf filename.tar.bz2
!
!
To extract a tar.gz file, the the command (note the z option)

Code:
tar -zxvf filename.tar.