I found a script that starts qemu with this option:
-device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
how do I connect to this machine? I want to SSH into it. I tried seeing the IP address inside the machine and SSHing to it from the host, but it doesn't work, and also they don't even share the same subnet.
There are several ways - modes how to connect qemu VM to a network. You can either create a private isolated virtual net of the range 10.0.x.y (-net user,restrict=on|off) through which you can connect the localhost or physical interface of the host machine with NAT (param restrict enables/disables this NAT). Or you can connect the physical interface of the host machine by using TUN/TAP, what must be configured on both sides host and guest. The last but the most complicated is to bind the host physical interface directlly to VM with passthrough option. In last two cases your VM is connected to the network with physical interface, hence you can start ssh server and connect the VM simply. In the first but mostly used mode the NAT must be configured to forward an incomming packet to the VM (parameter hostfwd=tcp:1.2.3.4:22-:22 = port redirection).
More detail you can find in the qemu user-manual.