After having a new "filling" the tooth shouldn't be sensitive or uncomfortable. But there are reasons it might be. So lets review some reasons why a tooth may be sensitive after a new filling is placed.
First off, I am going to discuss "white" fillings. These are made of a composite resin, which is a high strength type of plastic. These fillings need to be bonded to the tooth structure they touch or else oral bacteria and saliva will seep in between the filling and tooth. Old metal fillings did not need to be bonded because we depended on corrosion to seal the "gap" between tooth and filling (really, that's true!). But because it takes some time for the metal to start to corrode, we had to put a foul smelling varnish layer on the tooth before we placed the metal filling in to temporarily seal the tooth.