They are generally safe, but if abused can be dangerous which is true of pretty much everything. They block COX 1 & 2 which are inflammatory markers. They can cause intestinal bleeding and ulcers if abused. You shouldn't be depending on them unless a doctor has said so. That said, if you take it with food you should be protected from the bleeding issues. The prescription strength is 800 mg. The over the counter dose is 200-400 mg.
Why are you thinking about taking ibuprofen?