The 8086 in itself doesn't have any memory, so you can't upload anything to it. You need to build a whole x86 computer with that chip in its core and then put a program in memory at the position the CPU fetches the first instruction, and then let the CPU run.
If you go to the Wikipedia page for the 8086 you'll see that the 8086 is missing a lot of the things built in to modern CPUs, and needs separate chips so it can clock itself, handle interrupts, have any main memory, communicate over a serial line, or in any way interface with peripherals. So, the 8086 is a very complicated starting point if you just want to build something where you can upload some program to run.
You're essentially in need of building a minimalist clone of the original IBM PC!
If you instead of a 1970's microprocessor went for a 1980s (or better, later) microcontroller, you would have a chip that has the CPU, the main memory, the permanent memory, interrupt controllers, clocking circuitry, IO controllers and serial interfaces all built in. To that you could then upload a machine code program directly.
As to what you can do to learn the software side of things while you build your IBM PC, you could use an IBM PC emulator to run the binaries that come out of your assembler. It might be easiest to instead of bare metal binaries to produce normal DOS executables in the COM format, using a C compiler or an assembler of your choice, and running it from the DOS prompt in the emulator.