If you eat a piece of fruit, you can use a shovel to dig up an entire tree and put it in your pockets. Then you can place it wherever you like.
Get the Shovel Recipe
You will need a shovel to be able to relocate trees. You will get the shovel recipe from Blathers after he arrives in your town.
Eat a Piece of Fruit
Before you can relocate a tree, you need to eat a piece of fruit. You can shake fruit trees to get fruit, or just purchase one of your native fruit from the Nooklings.
Use a Shovel on a Tree
After you eat a piece of fruit, you can use a shovel to dig up an entire tree. The tree will go into your pockets. You can then place the tree wherever you like.