Go to a jungle biome and try getting lots of cocoa beans. Now just place them on a jungle wood block near your house and you get a cocoa farm. At first when it's seed it will be somewhat white and green. Once it is dark brown you can harvest them. Once you get a lot of seeds use some of them and leave some for sowing. read more
You could just look this up. But some main points to keep in mind are, Water hydrates in a 4 block radius. In other words, a single water source can hydrate in a 9x9 area. Crops grow faster when they are not next to the same crop. For example, a row of carrots, then potatoes, then wheat will grow faster than 3 rows of wheat. read more
Bear in mind that extremely large farms are impractical and unnecessary given the speed at which cocoa pods grow and the overall yield of beans from a relatively small planting. Pods grow quickly, achieving maturity in minutes, each yielding up to 3 beans, each bean making 8 cookies or dying 1 wool brown. read more