Importing Animation

How do you import an animation as in a walk cycle animation? I am trying to import a bed into unity, and I would like to have a basic animation for the model to have, including the animation used in Unity.

Without a more specific question, really the best place to start is the docs:

Importing Animations

Animation Editor

Scripting Animations