Depending on the component the common method is to use a .MODEL card for basic elements (transistors, diodes) or for more complex components (ICs like Opamps, Regulators, etc) you can use either a sub-circuit model (made up of basic elements) or a behavioral model (using formulas to approximate behaviour)
This can get very complicated very quickly, how complex depends on how accurate you need the component to simulate, and requires pretty detailed knowledge of the component type so you know which datasheet parameters are important, how they translate to SPICE parameters, etc.
For an example of the type of parameters you need to know about (at least some of them), in LTSpice help look under LTSpice->Circuit Elements->Bipolar Transistor and look at the Gummel-Poon parameters.
As complex as this looks, you can use the defaults for most and just alter the basics like the Bf (Beta), Vje(b-e voltage), Cje (base emitter capacitance), Cjc, etc. It's helpful to look at the various models that come with LTSpice to get an idea of things.
The help provides a lot of useful information, so read it thoroughly. Also "A guide to Circuit Simulation using PSPICE" is a half decent book with some discussion of the model parameters. Also, google for info on the models, you should find plenty - for instance, here is an excellent document on the Gummel-Poon model and how to use it.
Best Answer
Source: https://www.analog.com/en/technical-articles/ltspice-simple-steps-to-import-third-party-models.html