If you have a notebook and want to convert it to a package:
1. Wrap the notebook code between BeginPackage["context`"] and EndPackage[]. Make all the input cells to be initialization cells.

2. Save the .nb file as a .wl file in a place where MMA will find it. Filename same as the context. PackageTest
in this example.
3. It should now be possible to call and use the package
