The difference resides in that aú(u)n has two possible meanings. And that todavía has one when in comparison with it.
Meaning of todavía according to RAE:
todavía.
(De toda y vía).
adv. t. Hasta un momento determinado desde tiempo anterior. Está durmiendo todavía.
adv. t. ant. siempre (‖ en todo tiempo).
adv. m. Con todo eso, no obstante, sin embargo. Es muy ingrato, pero todavía quiero yo hacerle bien.
adv. m. U. con sentido concesivo corrigiendo una frase anterior. ¿Para qué ahorras?; todavía si tuvieras hijos estaría justificado.
adv. m. Denota encarecimiento o ponderación. Juan es todavía más aplicado que su hermano.
Aún means almost the same. The difference is the accent, that can change its overall meaning. Todavía and aún are sometimes called perfect synonims because they are claimed to be interchangeable. As Belisarius said and posted the rules, so I won't repost the rules here.
Now the meaning of Aú(u)n by RAE:
aun.
(Del lat. adhuc).
adv. t. todavía (‖ hasta un momento determinado).
adv. m. todavía (‖ no obstante, sin embargo).
adv. m. todavía (‖ en sentido concesivo).
adv. m. todavía (‖ en sentido de encarecimiento o ponderación).
adv. m. Denota a veces idea de encarecimiento en sentido afirmativo o negativo.
ORTOGR. Escr. con acento cuando pueda sustituirse por todavía. Aún
('todavía') está enfermo. En los demás casos, se escribirá sin tilde.
Te daré 100 duros, y aun ('hasta') 200, si los necesitas. No tengo yo
tanto, ni aun ('ni siquiera') la mitad.
As RAE says it is almost always interchangeable, but when it isn't aun has no accent. What does this mean? It means that aun is being used as even. To be concrete you write aun when you can substitute it by incluso this inherently means that it can't be changeable with todavía.
These are some examples to illustrate this point:
El Gobierno francés está persuadido de la “ilegalidad” de la operación
[...], pero aun así dará asistencia consular y jurídica a los 16
detenidos
Pero ningún hombre es respetable, ni aun los santos, ni aun los locos,
ni aun los niños que juegan con piedras junto a los pozos
Te puedo prestar 100 euros, aun 200; contal de que me los devuelvas.
Source for aun and aún.