There really isn't a set number of year that you have to study, but you do need to learn how to use the tools a computer animator uses to create computer animations. First, you need a computer. Then you need to use a animation app that you allow you to create animations. Check out https://www.blender.org/. This is an app that is free to download and will let you create computer animations. Also, check out this video https://www.youtube.com/watch?v=HyVvi-TjHlM showing you how to use Blender to start creating animations.
I didn't go to school in order to learn how to create computer animations. I simply started watching youtube videos and trying to do it on my own. You would be amazed of many cool computer animations you can create with just a little knowledge.
Obtaining a degree from a computer animation school will take about four years because many courses are required to learn animation techniques. At the end of four years, a BA degree is earned. Students may go on to earn a master's degree if they so choose. A master's degree in computer animation would take anywhere from 18 months to 4 years to complete depending on how many classes were taken each semester.
To enter the workforce and be competitive on the job market, a bachelor's degree, or four years of study would be the norm. During that time students learn by doing, and create a portfolio of animated short films which they can use as samples of their work when seeking a job.
During the first year of computer design school, students begin with the basics of 2D design. This type of animation was used for years to create the classic cartoons. The characters are drawn by hand and redrawn for each frame to create movement. This type of animated design helps students understand character movement and storyboard creation. Other classes taken include general English and math classes which are prerequisites for more advanced classes to come.
In the years that follow, students learn the subtleties of 3D computer animation and how to create realistic images and movements in virtual space. In order to do this, students must learn to use complex animation software that is commonly used in animation studios today. Students are also required to take classes such as geometry and physics to understand how to create models and how physical laws affect objects. All of these courses work together to teach students how to create computer animations that have lifelike movement.