A blast on a train in Pakistan's Balochistan province has killed at least 24 people and injured dozens more.