There is no check in - if you have your tickets bought and printed you just proceed to the platform area with your luggage.
Spain is different than much of the rest of Europe in that there is a baggage scan - you need put your bags through a conveyer belt X-ray like at the airport. I've never had this take more than 5 minutes though. In Madrid at least, you also need to show your ticket to get to the AVE section of Atocha. Again, a 2 minute process.
Also unlike airports, the platform isn't usually announced until a few minutes before the train comes. You wait in an airport-like area with chairs, shops, restaurants, etc and listen/watch screens for your train platform to be announced. Then you head to that platform with everyone else on the train. your ticket is checked,and you get on.
So...be in the area to hear your platform 10 minutes ahead. Before that you need to find this area (stations are big!) and go through a baggage screen. I'd say 30 minutes is safe. On your first train if you are unsure about the procedure go for 40 minutes. Not needed, but for me extra time in an unfamiliar situation is very helpful.