Yes you can grow an avocado tree from a store-bought avocado, and it’s a fun, easy project to try.
However, this is only recommended if it’s a decorative plant you’re after and not a productive one. An avocado seedling grown from a pit will take at least ten years to produce fruit, if at all. Fruit quality will also be low as avocados do not breed true, and the plant will be frost tender as the parent is likely to be the Hass variety that only grows outdoors in the warmest parts of the US.
If you seek a fruiting tree, it is recommended to buy a sapling from a specialist nursery.