Way 1: Jupiter is very big and its gravity pulled on the nearby space rocks. That strong tug kept the rocks from coming together and sticking into one big planet. Because they couldn't join, the rocks stayed separate and became the asteroid belt.
Way 2: Think of Jupiter like a giant spoon stirring a bowl of tiny rocks. The stirring and pulling kept the pieces moving and kept them apart, so they never clumped into a single planet. Instead, they stayed as lots of little asteroids in the belt.