First, let’s deal with the pronunciation of `deter’. The first `e’ is like the `i’ in `bid’, `bit’ and `sit’, and the second is like the `ir’ in `shirt’, `bird’ and `dirt’. The stress is on the second syllable `ter’. The word `deter’ is usually followed by `from’ and not `to’.
When you deter someone from doing something, you discourage him from doing it. You achieve this by making the individual realise how difficult the task may be, or by highlighting the unpleasant consequences of performing the task. You do everything to ensure that the person no longer wishes to continue to do what he was doing.
Example: Nothing you say will deter the students from joining the protestors.