面壁 = 面对墙壁
思过 = 思考过错
面壁思过 literally means face the wall and ponder about one’s mistakes. It also means standing in front of a wall as a punishment. Facing the wall makes a person focuses on his / her conscience and thus hopefully he / she will remorse and turn over a new leaf.