In this type of game, I suppose you must already have a map of the labyrinth which shows you if there is a brick in a certain spot (and what type of brick, if you have several) or it is empty and walkable. For example:
1 2 5 0 0 1 1 1
1 0 0 0 2 2 2 5
0 0 2 2 5 5 5 5
and so on, where 0 means empty place and 1, 2, 5, etc. mean different drawings of bricks. In this case it's easy to calculate in which "brick place" your character currently is, and into which "brick place" it will move with its next move. If the place is not empty, don't allow the character to move there.
This is the easiest to code in games where the character moves one place with each move. But if the movement is continuous and not just jumping from place to place, it can still be done. You can check the coordinates of the edge of the sprite in the direction in which it is moving, to see if that edge will collide with a brick or not. E.g. if you are moving to the right, then check the right edge position on the map after the move.