Martinez is Spanish for "son of Martín." The given name Martín is the Iberian form of Martin, popular across Christian Europe after Saint Martin of Tours, and the -ez ending is the classic Castilian "son of" marker (compare Rodríguez, Hernández).
It is not a place-name and not a craft: it points to a father's or ancestor's personal name. Portuguese cousins often appear as Martins. In US Census tallies the unaccented Martinez spelling dominates, but the meaning is the same as Martínez with the accent.