Don't know where to start with this LCD (JM164A)

It looks like a garden variety character mode LCD. If you want a more complete datasheet for the controller then search for 'HD44780'.

I have no idea on how to connect it to my Arduino and print text to it

You would use the LiquidCrystal library. There's an extensive tutorial at the Adafruit website.

Don