Quick answer
funcionar = to work in the sense of running properly: machines, devices, systems, plans.
trabajar = to work in the sense of doing a job: people only.
A device that has stopped is no funciona. A person with a job trabaja.
Side by side
Memory trick
Does it have a plug or a mechanism? Funcionar. Does it have a contract? Trabajar.
Typical mistakes
Mi ordenador no trabaja.
Mi ordenador no funciona.
A computer is a machine, so it funciona or not. <i>No trabaja</i> makes it sound like the laptop is refusing to do its job.
Funciono en una oficina en el centro.
Trabajo en una oficina en el centro.
People trabajan. Funcionar about yourself sounds like you are describing a device.
Check yourself
Fill in: "Perdona, el aire acondicionado no ___."