Dear Wei,
You might find detailed information in the publication related to the SPIN dynamics package: https://doi.org/10.1016/j.jcp.2018.06.042
The formula is a standard spin hamiltonian that you can find in most statistical mechanics textbook. So the dimension of H (and J) is the same as energy. The units will depend on the settings of the LAMMPS units command.
HTH,
Germain