The how isn't the hard part. The hard part is getting a liner made that will fit in the barrel that will still be a caliber that is desirable.
The bore should be concentric for it's full length, i.e. not choked. The breech plug is removed and the bore measured at both ends. A barrel longer than the bore is machined so that fits tightly in the bore. The liner is either epoxied or soldered in place so that will be up against the breech plug on one end and is flush with the end of the barrel on the other.
Problem is that most guys won't make a liner with thin walls so you end up with a small caliber rifle next to a shotgun barrel. Not a problem for centerfires and their high velocity little pills. For a muzzleloader it might be a desirable squirrel or turkey getter but the gun will not balance very well with all that weight on one side.
Good luck and enjoy, J.D.