It depends on the plane. Usually there is a button on the underside of the armrest by the hinge. Sometimes it seems the button is missing and you would need a pin of some type to push up into the armrest to activate it - I've never laid down in the aisle to look up and see what is really going on though.
It can work on both aisle and window seats.