Well, there's a simple answer and a more complicated answer. Both are species (more than one) in the genus Rubus, but it has hundreds of species that also includes dewberries, cloudberries, salmon berries, thimble berries, and more, including many hybrids like boysenberry. Locally it's a bit easier. Raspberries, both cultivated and wild, red, black, orange, purple, or gold, are thimble shaped; the drupelets pull free of the receptacle, so the fruit is hollow. The receptacle stays with the drupelets on blackberries, which often are more elongate in shape. The brambles are similar, as are the flowers, but our raspberries have a powdery-waxy coating on their stems which easily rubs off. Blackberries lack this. TPP is uncertain whether this holds true for all species bearing those names or not. But here in eastern N. America, that works. Blackberries are of course dark purple-black, but so are our wild black raspberries. So there you go. That's the simple version.