Unless you speak Russian, we wouldn't recommend flagging down a taxi on the street in Moscow, as drivers are unlikely to speak English. If you do decide to do this, bear in mind that the "taxis" are not always official licensed vehicles, despite what the driver may say.
The best thing to do is book a taxi via a reliable service. Your accommodation will provide you with recommended numbers to call or contact them for you, or alternatively, the Yandex app is a really useful way to book taxis on the go. Like other taxi apps, you can select the exact pick up and drop off addresses, avoiding the language barrier as much as possible.
We always recommend agreeing the price of your taxi in advance, clearly indicating your destination, to avid misunderstandings and nasty surprises when it comes to paying.
Fees are generally reasonable, and often cheaper if booked in advance. Taxis to and from the airports vary between 1000 and 2500 Roubles, and there are extra charges for children's car seats and luggage. Do bear in mind that Moscow's traffic can get crazy, so avoid travelling by taxi during peak times, and make sure to leave plenty of time if you've got a flight or train to catch!