Subdivision is a method that mentally breaks rhythms into smaller pieces.
Probably the simplest way of doing this is to break longer notes into beats, quarter note values. These two figures look different, but sound the same because of the tie. Seeing the two quarters makes it a bit more clear immediately that the note receives two beats (in 4/4).
You can do this in your head to make your rhythm more accurate.
It can be done with quarter note values and that may be enough in some cases, but you can also break things up in eighths, triplets, sixteenths and even beyond.
Originally, St James looks like this:
You could think of the first phrase of St James Infirmary like this, with a subdivision of eighth notes:
As you are practicing, something else you can do is play all the eighth notes separately. Doing that would be a step in the process of learning the song, but not the final step in playing it.