Without a DAW
Connect MIDI-out port of Yamaha MO8 to MIDI-in port of Maschine with a MIDI cable. This way you can directly trigger Maschine sounds from Yamaha O8. Maschine will playback the MIDI channel picked on Yamaha O8.
[Yamaha MO8] MIDI-out >---> MIDI-in [Maschine] USB --- USB [PC] >---> Audio OUT
With your DAW
The other way is to use your DAW for the routing.
Connect your both devices' MIDI or USB ports to your computer.
Create an empty MIDI channel on your DAW.
Set Yamaha MO8 to MIDI-In of the Maschine plug-in instrument of that channel.
In some DAW's you can directly send Yamaha MO8 to the plug-in instrument as MIDI-in.
If necessary, adjust MIDI channel numbers for ins and outs.
For the stand alone version, most stand alone synths have an option for that but it may be different for Maschine's case because of NI's marketing strategy. In this case you can always use the first option above (Without a DAW).
I think connecting Yamaha MO8 to Maschine hardware directly with MIDI cable is a better solution becasue you can use both hardware for input directly without any extra work. Doing that within the DAW may need extra work and complicated routing. Actually it depends on what will you do with them.