This depends on which bot template you used to create your bot, how you have configured it, how you are training it, and your goals.
Normally a bot would be created for a specific purpose, such as customer service, education, health, etc., and then trained with specific responses and conversation flows relevant to that topic. The bot would normally be trained through the bot's Training & Chat Logs page. You can also correct a bot's response while chatting with it.
Another option is to link the bot to a live chat channel that is serviced by human operators and have the bot automatically learn from their conversations, or even learn from a Twitter profile.
You can also create a personal bot, or a chatter bot that can learn from its conversations with yourself or others. There are two main ways the bot can learn.
The first is you can enable learning from the bot's Learning & Settings page. This will have the bot learn all of your or other users responses from its conversations (you can configure who the bot learns from).
The second is using the Understanding script or other scripts. Some templates include the Understanding script, others you would need to add it, or rebootstrap your bot's scripts. The Understanding script attempts to understand simple phrases and learns from them. For example if you said "I like pizza" the bot would understand and remember this. If you then said "Do I like pizza" it would answer "Yes."