Well, first you need to find a coconut on the beach. Once you did that, dig a hole with your shovel near the beach. Make sure it is near the beach r it wont grow. Now plant it nd water it. In a few days, it will grow coconuts and Tom Nook will buy them for 500 bells.
Actually, that is partially right/wrong. First, find a coconut. They wash up on the shore or come as gifts from villagers. Next, you have to bury it so it is not in the sand, but just on the ground.Now, you will have to water it daily. Make sure you get it on the tree trunk, watering it about 3-5 times to be safe. You can make more coconut trees when the two coconuts grow, which I recommend doing. They sell for 900 bells.