Fill in a number in each cell. Next to the puzzle is indicated which numbers are used. The numbers in each row and column have to be all different. The numbers in connected cells have to be equal.
To start with, we can fill in a 1 in the cell that is connected to the given 1. Now the third row also needs to contain a 1; it cannot be in the first column and also not in the third, since this cell is connected to a cell in the first column. Therefore, the 1 needs to be in the fourth column. Now there is only one possible place for the remaining 1.
In the first column, the 2 can only be in the second row, because of reasons similar to the one above. Next we note that the 2 in the fourth column can only be in the bottom row, and the last 2 has only one available position left. The 3s and 4s can now be filled in rather easily.