We report the crystal structures and physical properties of trilayer nickelates Nd4Ni3O10 and Nd4Ni3O8. Measurements of magnetization and electrical resistivity display contrasting behaviors in the two compounds. Nd4Ni3O10 shows a paramagnetic metallic behavior with a metal to metal phase transition(T * ) at about 162 K, as revealed by both magnetic susceptibility and resistivity. Further magnetoresistance and Hall coefficient results show a negative magnetoresistance at low temperatures and the carrier type of Nd4Ni3O10 is dominated by hole-type charge carriers. The significant enhancement of Hall coefficient and resistivity below T * suggest that effective charge carrier density decreases when cooling through the transition temperature. In contrast, Nd4Ni3O8 shows an insulating behavior despite small value of resistivity at room temperature. The compound shows paramagnetic behavior, with the similar magnetic moments as in Nd4Ni3O10 derived from the Curie-Weiss fitting. This may suggest that the magnetic moments in both systems are contributed by the Nd ions. By applying pressures up to about 49 GPa, the insulating behavior is still present and becomes even stronger. Our results suggest that the different Ni configurations (Ni 1+/2+ or Ni 2+/3+ ) and competition between localized and itinerant electrons may account for the contrasting behaviors in trilayer nickelates Nd4Ni3O10 and Nd4Ni3O8.