Iterating feature class output file names using ModelBuilder?

There are several ways to deal with naming in model builder. ArcGIS has a help section on this: A quick tour of using inline variable substitution.

One slick way to quickly create unique names from an iterator is by calling the %i% or %n% system variables, which output files in the following form: file1, file2, file3, file4... The %i% system variable references the current list position, while the %n% system variable references the current model iteration. You would put this into practice in the output parameter of a tool you are using. For example:

Output Feature Class

C:\temp\out%i%.shp

Here is the model, it uses inline substitution as described by Aaron. Note the output of the Polygon to raster tool is ..\fGBD_Scratch.gdb\ras_%Value%. Value is coming from the iterator which in this case was set to FID to hand out unique rows. So the first raster dataset would be ras_1, then ras_2, etc.

Model