Basil can be grown from seed, or you may buy buying established seedlings. Basil grows readily in pots/containers and in the ground. It is a great companion plant for tomatoes.
Basil grows well in full sun, but well-established plants can tolerate partial shade (purple basil will bleach out in full sun). It’s an annual plant and you will need to re-seed/plant new seedlings each year.
Start harvesting the basil leaves when the stems start to get a bit woody. Avoid picking more than a third of the leaves at any one time (to allow resources for regrowth), but be vigilant about picking off the flowers as this prolongs plant growth.
Basil can be used fresh (best) but can also be dried or frozen.