Compute the differences between each pair of observations. Rank these differences in ascending order, ignoring the sign of the differences. Assign the ranks back to the differences, keeping the sign. Sum the positive and negative ranks separately. The test statistic is the smaller of these two sums.
The null hypothesis (H0) typically states that the median difference between pairs is zero. The alternative hypothesis (H1) suggests that the median difference is not zero.