It's usually used when there's an important announcement for all to hear and catches people's attention. I'm sure you all have seen old movies where a herald would stand in the middle of the town square with a scroll in hand and shouts 'hear ye, hear ye!'. And then would proceed making his official announcement that would originate from the castle. Another commonly used expression would be 'Hear hear'. This is often used when one wants to call to attention of what somebody just said.