Assuming you are using an array to represent if block positions are filled or empty, loop through your array one row at a time. The condition would be that every spot in that row has to be filled, and the action would be to delete that row and move everything above it down one.
The trigger to run this check should happen only when next block is spawned, using whatever logic you have in place to determine the previous block has been placed. This way rows won't get deleted as blocks pass by and "complete" rows.