If you shake off something that you do not want such as an illness or a bad habit, you manage to recover from it or get rid of it. If you shake off someone who is following you, you manage to get away from them, for example, by running faster than them.