The canvas is the visible area of the sprite. You can change the canvas size using Sprite > Canvas Size... menu.
In this window you can change the Width
or Height
manually, or
using the blue rules in the editor window.
You can change the canvas size using the current selection bounds:
You can remove transparent borders from canvas automatically using the Sprite > Trim menu.