Any spell that has ''artifact'' in the type. It does not count if you cast a card with semblance anvil discount. Also, you get the discount if you exiled a card that shares a type with it.
Lands are not spells.
Anything else is, at least for a time, a spell. When you cast any spell with the type "artifact" listed on the card (exceptions are the artifact lands from Mirrodin), Myrsmith can be activated.
Also, casting at an altered or alternative cost is still casting.
@xo2 why would the discount from the anvil stop an artifact spell from triggering Myrsmith ?
if you use an artifact for the anvil all artifacts cost 2 less to cast and even if you cast an artifact for 0 you can pay 1 with Myrsmith to put a myr onto the battlefield