Flying from the UK to Ireland, you'll be checked (and stamped, if applicable) by the Irish on arrival. Flying from Ireland to the UK, you won't have any border checks, and it will be on check-in staff to make sure you're allowed into the UK.
By sea, there may be spot checks by the country of exit or entry. For example, when I took the bus from London to Dublin, I got off at Holyhead at night for a check by UK Immigration Enforcement (not Border Force). However, in Dublin, there was no check.
I'm told that, as a pedestrian at the Irish ferries terminal in Dublin, you will be checked and, where applicable, stamped, though I cannot personally confirm this.
By land, checks are very sporadic, so indeed, this can be used as a loophole. However, TIMATIC, the database used by airlines, states that passengers who have been refused entry to the UK (ie with a refusal stamp) could be refused entry to Ireland, and I know one case of denied boarding due to this alone.