Here in the UK, this phrase is used in 3 ways:

1) Repeat what you just said.
2) Used as a figure of speech to express shock/exclamation. 
3) Sorry/excuse me.

In essence, it’s just a more ‘posh’ way of saying “Pardon me.”