RPM Macros
When you have questions like this it's best to consult the man pages. Take a look at the rpm man page.
$ man rpm ... -E, --eval='EXPR' Prints macro expansion of EXPR.
Realizing that %fedora is a macro if you go a bit further down in the rpm man page you can see what files provide macro definitions.
Macro Configuration /usr/lib/rpm/macros /usr/lib/rpm/redhat/macros /etc/rpm/macros ~/.rpmmacros
Taking a peek inside of /etc/rpm/macros will reveal this definition.
$ grep fedora /etc/rpm/macros* /etc/rpm/macros.dist:%fedora 19
So we can see that there is a definition called %fedora and on my system (Fedora 19) it has a value of "19".
Inline command execution
The notation $(..) will execute whatever command is between the parenthesis and substitute the returned results in their place.
Example
$ echo $(echo hi) hi
Or in your case:
$ echo $(rpm -E %fedora) 19
Putting it all together
So when the command you're asking about runs the following things happen. A RPM macro, %fedora is evaluated using the rpm command. That command is executed in line. Once expanded to "19" that value is used within the larger yum command to install the appropriate .rpm file for a given version of Fedora.