some of the ways they form are permialazation and replacement.
replacement is when the hard parts decomepose and diffrent minerals form in place of the bones shells or carapaces. Another way is perminilazation this is when the soft parts decompose and crystals take the place of the bones or the shells.
A very common fossil is the trilobite it is a sort of organism that is similar to a horseshoe crab. There are diffrent types of trilobites which scientists believe to be from diffrent time periods and or diffrent regions. some trilobites seem to have a bigger shell or spike to defend from predetors and maybe to get food.