With small children, the only thing you can do is keep your attention on them at all times (to prevent accidents as much as losing them).
For older children or adults, nowadays the best way is for everyone to bring a cell phone (or buy a cheap prepaid one locally).
And as a fallback, agree in advance on an easy-to-find place where you'll meet if you lose each other.
travel.stackexchange.com/users/1371/Michael Borgwardt
In addition to the other answers, when I go with groups we always set a meeting point every time we go out to a new place.
A landmark or an easy place to reach will be perfect meeting points.
So if anyone is lost he/she directly will go there, the rest will go there as well in case some members are missing.
For kids, always teach kids the name of the hotel, so if they got lost the police can deliver them there directly or at least contact the hotel.
travel.stackexchange.com/users/10051/Nean Der Thal
Another tip is to each one carry a map and to know how to back to hotel.
In case of visiting places crowded with big chances to get lost, is important to combine before a point to meet.
If it doesn't works, don't despair, at night you can find each one in hotel.
travel.stackexchange.com/users/7698/Guilherme Noronha
I've found a walkie talkie to be a very useful addition when hiking.
However: This might not be the ideal solution if you're in a place where reception might be weak.
I also don't think that a strap/buckle is a good idea, especiall in large crowds.
You're going to annoy other people when they're getting cought in your "setup" or you might even hurt yourself.
Bad idea.
No matter what you choose for staying in contact, you always should have a backup meeting point.
It's not that hard remembering "If we get separated, we'll meet at XYZ at 17:00".
As a side note: I prefer not to enforce the "let's stay together" rule.
In a crowded area this simply puts you under a lot of stress.
You constantly check whether your party is still with you and forget enjoying the experience of just "being there".
Give yourself some slack and arrange something
kike
"We'll try staying together
but if you wanna take a look at X or get stopped by Y then we'll meet again in two hours at Z".
A lot more enjoyable.
Of course this doesn't work that well with small children :)
travel.stackexchange.com/users/4742/perdian
I disagree with the other uses in a meeting place or a map.
Those are great ideas but eventually you're going to forget.
You're traveling, you're always in new places, seeing new things.
I would suggest getting a 1990's brick phone and traveling with that.
They last like 140 hours of battery life
so that's normally not an issue.
They are cheap, SIM cards are relatively cheap for a small pre paid one.
That way you can get in contact with each other regardless of where you got separated.
As the other people suggested, you should know where you're staying but cell phones are the best safety device in the world in my opinion.
travel.stackexchange.com/users/7582/Greg
Even in the age of mobiles there is always the possibility you will lose each other.
The country may not have many cells (third world), the connection can be bad(silent zones) or the country uses another band / is prohibitively expensive.
So what we need is a simple rule: If someone get lost, wait a predetermined amount of time (I used 15 minutes) at the last position all people were together !
Both people do know then how long to wait and if there is a chance you will meet easily.
But there is the possibility you cannot use the rule because you are traveling longer.
After that it depends what were you planning.
If both parties are independent(each has money, papers, but perhaps not the hotel keys), you will meet at thehotel in 3 hour intervals (12:00, 15:00, 18.00...).
If a party is dependent on the other and the 15 minute time interval failed,both parties will march straight to the main railway station at the main entrance .
If the location has no railway station (village), use the mostconspicous object inside the village (which will be here in Europe mostly a church).
At night time use the police station.
travel.stackexchange.com/users/7442/Thorsten S.
Although we had our share of disagreeing bystanders, we were quite happy with our buckles .
When it comes to small children you should care less what bystanders.
travel.stackexchange.com/users/None/
Whether traveling with a child or friend, especially in large crowds, should one take precautions to avoid losing someone?  I will be backpacking, so packing light is important; however, I still thought it would might be necessary for me to get something like a walkie talkie. I have even considered using a strap/buckle and attaching it to the other person. This sounds ridiculous, but losing someone would ruin a great portion of the trip.
How to avoid losing someone while traveling?
travel.stackexchange.com
<safety>
travel.stackexchange.com/questions/19275
travel.stackexchange.com/users/7735/MarkE
A strap/buckle is probably not a good idea, especially in crowds. Instead, keep your attention on small chilren at all times to prevent accidents or losign them. Always teach kids the name of the hotel and arrange a meeting place in advance. A walkie talkie or cellphone is often the best way for older children or adults to stay in contact. Most older children and adults can find each other again after getting lost using a mobile phone or walkie talkie. However, technology can fail so a backup plan, such as a meeting point, is recommended. When travelling with children, always keep an eye on them and make sure they know the name of your hotel.
When travelling with children, it is important to pay attenetion to them all the time. Children should always know the name of your hotel, in case they get lost. Older children and adults can generally find each other using a mobile phone, walkie talkie or brick phone. Technology can sometimes fail, so always have a meeting point as a backup plan.