Introduction to discrete modeling in physics