US law is state dependent, but generally, if you're a bicycle on the road, you're considered equivalent to a motor vehicle. If you're a bicycle on a sidewalk, you follow the rules for people on sidewalks (this isn't always permitted depending on area). For example, to quote the New Jersey driver's manual, for a controlled intersection:
An intersection is controlled if there are traffic signals or signs in any direction. A
motorist must obey the signals and signs. At a controlled intersection, a motorist
must yield for certain conditions. At a multi-way stop or stop intersection, a motorist
must yield to the motorist on the right if both motorists get there at the same time.
A motorist should also yield to another motorist already stopped at the intersection.
At an intersection controlled by a yield sign, a motorist must slow down and yield to
traffic on the intersecting roadway, even if he/she has to stop. When making a left
turn at an intersection, a motorist must yield to oncoming traffic and to pedestrians
within the crosswalk.
and from the same source, for an uncontrolled intersection,
An intersection is uncontrolled when two or more roads join and there is no traffic
signal or regulatory device. A motorist must be very careful when approaching
these types of intersections. Most of the time there will be a warning sign prior to
reaching the intersection. As a motorist nears a crossroad that is not controlled,
he/she must reduce speed and be ready to stop if any traffic is coming from the
right or left. A motorist coming from a private road or driveway must yield to all
traffic on the main road (although a motorist can never be sure that will occur). As
a general rule, the vehicle on the left should yield to the vehicle on the right. When
a traffic signal is not illuminated because of a power failure or other malfunction,
the traffic signal is observed as a 4-way stop signal.
Unfortunately, people are different in their behavior to bicycles and you need to be vigilant. Following the law by yielding to people who have already arrived generally works well (even if you have to wave them to go yourself even if they have the right). If they're waving, check and proceed with caution -- there are a decent number of people who will also try to gun it with a cyclist, and there may be both types to yield and gun at the same intersection.