A teacher at a school in Sydney's west has been charged with child-related offences.