This should get you started and give you some search terms. Essentially, you treat each brick as a bounding box. Based on the position of the ball, you should be able to determine if the ball collides, this is based on the fact that you consider the ball as a simple bounding box with a given height and width.
source share