From the top menu, make sure that both your "Animation" and "Animator" windows are open.
Note: Unity will automatically do this for you when you create your first Animation Clip (next step) while selecting a GameObject in the Hierarchy. I just feel like it is helpful to understand how to do it yourself.
You can directly record changes to most any attribute of any GameObject component. For example, you can have the x- and y-scale of your character change in an animation to make it wobble a little bit. You can change the z-rotation in an animation to make a wheel spin. You can change the color of the sprite renderer over time to show sunrise to sunset. Below is a brief explanation of how.
Hit play to see it in action. Since this is the only animation you have (you don't have a static unmoving animation clip), your player will start the game doing this animation on loop.
Unity will automatically smooth out the "tweening" between the key values that you set when recording your animation. In other words, the animation will automatically rotate the tree smoothly from (0,0,0) to (0,0,10) in a half of a second)
If you don't want Unity to automatically choose "tween" method to use to smoothly go between your key moments in the animation clip, you can edit the curve yourself.
I find this useful to smooth out the start and end of my animation clips, in case the loop doesn't look smooth going from run to jump, or rotating one way to resting.
Brackey's Videos on Animation
BlackThornProd Videos on Animation
These walk you through how to navigate between animations using scripting. One thing I never got to adding to the slides are "Trigger" parameters. Triggers are essentially just boolean values that automatically switch back when the animation is done. This can be really useful for things like "attack". Trigger the onetime animation clip and let it automatically untrigger. It is a parameter datatype just like boolean or float, and you code it the same way except for you don't need to pass in a value. Instead of "anim.SetBool("walking", true);" you simply write "anim.SetTrigger("Attack");". You still need to create transitions in your Animator that use this as the condition.
Published Nov, 2018. You need 2018.3 or better to use these tools.
Brackey's Videos on Animation
Miscellaneous Other Videos
BlackThornProd Videos on Animation