A 30 amp breaker takes 10 AWG copper or 8 AWG aluminum, and the answer is the same in NM-B cable and in conduit. 10 AWG copper is rated 30 A at 60 °C and 35 A at 75 °C, but NEC 240.4(D) caps it at a 30 A breaker either way, so the 75 °C column doesn't buy a smaller wire. 10 AWG aluminum is capped at 25 A, which leaves 8 AWG aluminum, rated 35 A at 60 °C.
A clothes dryer is the most familiar 30 A circuit in a home. The four-wire dryer receptacle is the NEMA 14-30: 30 A, 125/250 V, four wires, meaning two hots, a neutral and a ground. The 125/250 V rating means it supplies 240 V across the two hots and 120 V from either hot to the neutral, so the circuit needs all four conductors. In NM-B that is 10/3 cable: three insulated conductors plus the bare ground. You may also find a NEMA 10-30, the older three-wire type, which has two hots and a neutral but no ground. If you're replacing a dryer or its receptacle and find a 10-30, ask an electrician or your inspector how to handle it.
Electric storage water heaters are the other common 30 A circuit. NEC 422.13 has the branch circuit for a storage water heater of 120 gallons or less sized at 125% of the heater's rating. Working backward, a 30 A circuit covers a heater drawing up to 24 A, which is 5,760 W at 240 V. The nameplate decides, not the 30 A figure: a heater rated higher needs a larger circuit, and the installation instructions give the breaker the manufacturer calls for.
The NEMA TT-30 is the 30 A RV receptacle, and it is a different circuit: 125 V, not 125/250 V. That makes it a 120 V run, so the length table below, worked out at 240 V, understates its voltage drop. At 120 V and the full 30 A, 10 AWG copper reaches 3% at 49.4 feet one way, where the same wire at 240 V would go 98.8 feet. An RV pad 100 feet from the panel on 10 AWG would see a 6.07% drop at 30 A. For a TT-30 run, use the wire size calculator with 120 V selected.
A 30 A feeder to a small subpanel, in a shed or a detached garage, uses the same sizes: 10 AWG copper or 8 AWG aluminum. If the subpanel serves continuous loads, the feeder is sized at 125% of them, under 215.4(A)(1) (215.2(A)(1) in 2023). For an outbuilding the deciding factor is usually distance. At 240 V, 10 AWG copper stays within 3% out to 75 feet, the length table moves to 8 AWG at 100 and 150 feet, and to 6 AWG at 200 feet. A 150-foot run of 10 AWG at the full 30 A drops 10.93 V, which is 4.56%, past the 3% that an NEC informational note suggests (a recommendation, not a requirement).