Some cities have a high crime rate, such as Chicago and Detroit. But as with all Western countries, you can avoid being a victim of crime if you use your common sense. Avoid venturing into unknown areas at night and keep an eye on your belongings. Always trust your intuition in any circumstance.
Please do remember that many places considered to be dangerous equally have beautiful parts of the city to explore, which would be a pity to miss out on.
America is highly politically charged, so some cities are more liberal or conservative than others. This may affect your experience so you should be aware of current affairs. Your gender, sexuality, ethnicity and/or religion may spark problems and cause a backlash. Keeping up to date with current controversies and/or laws will help to keep you safe.
It’s highly recommended to have travel insurance for America, for any unforeseen events. Medical services can be incredibly expensive so it’s best to have yourself covered.