The main thing is not to worry.
Get the RF100A form
Ring the Motor Tax Office
They will tell you when last tax expired.
You are only liable for the tax from the date of purchase(If you bought during Jan then you are liable for the full month of Jan etc).
If the tax expired in the months previous to purchase, then as Janet says you get the part of RF100A signed by your local Garda to cover the months of arrears due to previous owner. These are not your responsibility.
The Motor Tax office will tell you the amount of arrears and the amount to cover the future tax period. You acn then just post off the RF100A with cheque or credit card details.
Rgds
Billo