Just giving some examples to show the difference that Raphael stated previously.
As 'dans' refers to the ' Rapport d'intériorité dans l'espace' interiority in space, so it usually equals the preposition 'in' in meaning :
- Je vais en mettre une bouteille dans le puits pour demain.
Figuratively 'dans' is also used to refer to abstract concepts of sensations or ideas as in :
- Nous avions dans la tête et dans le cœur quelque chose qui nous intéressait bien autrement que le latin, et la danse.
' à' in the sense of 'in':
habiter à la campagne
to live in the country
être à Paris
to be in Paris
- In the sense of 'at' :
être à la maison
to be at home
être à l'école
to be at school
- In the sense of 'to' :
aller à la campagne
to go to the country
aller à Paris
to go to Paris
- In the sense of 'of':
un ami à moi
a friend of mine
In certain expressions ' à ' could be translated in English to 'on' 'by ' or ' from' as in
à bicyclette by bike
à la machine by machine
à la main by hand
à la radio on the radio
à la télévision on television
à pied on foot
boire à la bouteille to drink from the bottle
It is a bit tricky to differentiate the meanings here and could be only easily distinguished and memorized through practice and repetition.
Both 'dans' and 'à' could be parts of expressions and there they loose their most commonly used senses.
Expressions using 'dans' :
- dans l'attentat à at the attempt on
- dans l'attente de looking forward to
- dans ce temps-là then
- dans le délai imparti within the time limit allowed
Expressions using ' à ' :
- à demain! see you tomorrow!
- à la semaine prochaine! see you next week!
- à samedi! see you on Saturday!
- à tout à l'heure! see you later!
à leur grande surprise much to their surprise