well you need to make sure you've set up your drivers for your midi ports. then open cubase. then make sure that the ports are selected in the various places in your device setup. then hit the keys and see if the little red level meter is working on the transport bar (that means you've set everything up right).

then you need to create a midi track. then assign the correct midi port to the in. choose a vst instrument and then assign this to the out. and hey presto, you're off..