It's called "breaking the fourth wall" and refers to a convention which evolved in the nineteenth century. The idea was that the actors were to behave as if they were in a room with four walls, three of which are the walls of the set of the proscenium stage and the fourth of which is a kind of one-way glass between the actors and the audience: the audience can see through it, but the actors can't, and so are not supposed to acknowledge the existence of the audience in any way. If someone on stage does acknowledge the audience, it's called breaking the fourth wall. The actor does not have to speak to the audience: it is sufficient if he looks at the audience and winks or makes some other sign that he sees them.Of course, not all drama uses the fourth wall convention. A lot of plays both old and new don't.