In short: Yes.
Logic allows you to plug in MIDI devices such as keyboards, drum machines, MPDs, etc. and use them to create MIDI data on a MIDI track. You can assign software instruments to MIDI tracks so you can use a variety of synths, drum kits, keyboards, etc. with your MIDI devices (live or in post). Logic software instruments work much the same as any other DAW's software instruments. The piano roll can be used to draw in MIDI notes the will be played by the software instrument, to correct notes previously recorded on a software instrument track, or anything else you might find useful.
If you have access to a computer with GarageBand on it, you might want to test out some of the software instruments in GarageBand as they are very similar in function to Logic's software instruments.