You can travel freely between both countries. The border between the Republic of Ireland and Northern Ireland is open. There is no physical border between the Republic of Ireland and Northern Ireland and you will not pass through UK immigration control if arriving to Belfast through Dublin. There are no passport controls when travelling between both countries.