Dozens of people were killed and many others wounded in a bomb blast in a tribal region of North West Pakistan.