This has been answered multiple times in this forum, use search.
Basically some quests are client sided which should work and you shouldn't touch and some must be scripted. Scripts are located at scripts/quest folder and are divided into start and end. For further info use search