Confidence tricks are the biggest annoyance & danger to travelers in less developed areas
These type of tricks which, it has to be said, are a mainly urban phenomenon, range from the downright predictable and harmless 'Do you remember me?', 'I am going to university in your home town' or 'Would you like to have a drink with my family or see a traditional tea/coffee ceremony' (turns out you are visiting the family's shop or get a US$10 bill for a cup of tea). These sorts of lines you get wise to very quickly. If you fall for them - which is not that difficult - lose you only a few dollars and gain you a ton of experience. The other (more limited) side is far more sinister, often involving bogus policemen and sometimes drugs.
If you are unsure or in 'one of those areas', the sensible approach is to never go off somewhere with anybody who approaches you in the street, on the assumption that they are after something. Make up a bullshit excuse or if you have a companion, simply start up a conversation with the other completely blocking the stranger out or if alone cross over the street. It is advisable to avoid, in many cases, getting into conversations - as the longer you spend talking the harder these characters are to shake off. If you do see the situation becoming serious, i.e. the stranger has lit a joint and now the 'police' are here, simply keep your head, make your presence known and be clear that you will make no concessions, not even answering questions, certainly not handing anything over or going anywhere (apart from the police station by you own means).
These sorts of tricks work on fear, bullying and often guilty (since the other party will always be very friendly and will build up a relationship before hitting you for money). Keep your head and don't be sucked in. Walk away or say no at any stage. Don't feel uncomfortable to do so. Really the best advice when it comes to money is trust no-one. Don't leaving it lying around in sight or display it unduly. Be wary of paying in advance when there are no business premises or guarantees and finally be as clear as you can on agreements of prices for goods or services when you are paying after the event (i.e. taxi ride). It is worth noting, that if on your own the above will be a far greater issue for you.
If you want to learn more, a great read is 'Around the World in 80 Scams' by Peter John.