Answer:
It depends how you travel. If you are coming from outside the British Isles, travelling directly to Northern Ireland will not work, as you will need a UK visa.
However, Ireland and the UK share a European Union 'Common Travel Area', meaning there is no controlled or monitored border between Northern Ireland and the Republic of Ireland. In fact the border is unnoticeable.
So you can travel to the Republic and cross into Northern Ireland completely legally and with no problems.