Heat a large, preferably cast iron, skillet over high heat (no oil). You may want to turn on your vent hood because this can get really smoky. Add the chilis and the tomatoes and roast until the skins are charred and blackened all over. Remove from heat and allow to cool.
In a molcajete (lava rock mortar and pestle found at Mexican grocers) or the cup of a blender or processor, mash (blend) garlic and salt to a paste.
Add a couple of chilis and mash or blend those with the garlic paste. Add most of the tomatoes and mash or blend until chunky. At this point, taste for salt and heat. If not spicy enough, add another chili. If too spicy, add more tomatoes. Add chopped cilantro and onion, if desired.