A Kruskal Wallis Test compares the difference between more than two independent groups, such as comparing the difference between groups A, B and C. If your data only has two groups such as Male/Female or Present/Absent you should consider the Independent-Samples t-Test
It is considered a non-parametric test and is suitable for non-parametric data. To check if your data is parametric, please check out the dedicated guide: Parametric or Not Guide (PDF)
If your data is parametric you should consider using a One-Way Between-Subjects ANOVA
Click Analyze > Nonparametric > Legacy Dialogs > K Independent Samples
Within the "Tests for Several Independent Samples" Window, select the test variable or dependent variable you are analysing and move it to the "Test Variables List" box. Then move your independent/grouping variable into the “Grouping Variable” box.
Click "Define Range". Select the numbers corresponding to your maximum and minimum values, I have 3 groups labelled 1,2 and 3, so I will use 1 and 3.
Click "Options". Within the "Several Independent Samples: Options" window select "Descriptives"
Select Continue and OK
SPSS will generate three tables, to correctly report this test we need three, the "Descriptives", the "Kruskal-Wallis Test", and the ANOVA Effect Sizes:
This table shows the specific test results including the H-statistic (H, which you may also see reported as the χ2), the degrees of freedom (df), and the two-tailed significance/p-value (Asymp. Sig), we need to report all three.
A Kruskal-Wallis test was performed on the scores of the three groups (A, B and C). The differences between the rank totals of 34.91 (A) , 30.71 (B) and 46.43 (C) were significant, H (2, n = 73) = 6.75, p = .034.
In addition, if your ANOVA is significant you must also carry out and report a post-hoc test to find which groups are different to each other. A Dunn's test or Mann-Whitney could be considered here to test between the pairs of unrelated groups. You also have options for which correction (for multiple test) to use. In the example below we have used Mann-Whitney Tests with the Bonferroni adjustment:
Post hoc comparisons were conducted using Mann-Whitney Tests with a Bonferroni adjusted alpha level of .016 (0.05 ÷ 3). The difference between Group B and Group C was statistically significant (U (NGroup B = 24, NGroup C = 22) = 145, z = 2.62, p = .009). None of the other comparisons were significant after the Bonferroni adjustment (ps > .017).