The userfield usage of avatar already includes its HTML. If you want to make it a link you can surround it with an href usage. Example as follows.
Code:
<a href="URL_HERE">[cb:userfield field="avatar" /]</a>
The userdata substitution usages is raw. It should be the entire src from live_site to the file it self. The below should give the exact same results.
[avatar]
[cb:userdata field="avatar" /]
The difference between the two is userdata can use substitution params.